laconic-registry-cli/.gitea/workflows/test.yml

61 lines
1.5 KiB
YAML
Raw Normal View History

name: Tests
on:
pull_request:
branches:
- '*'
push:
branches:
- main
- release/**
env:
DOCKER_HOST: unix:///var/run/dind.sock
jobs:
cli_tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
2024-01-24 11:38:25 +00:00
- name: Download yarn
run: |
curl -fsSL -o /usr/local/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.21/yarn-1.22.21.js
chmod +x /usr/local/bin/yarn
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies and build
run: yarn && yarn build
- name: Install registry-cli
run: yarn global add file:$PWD
- name: Log CLI version
run: laconic --version
- name: Checkout laconicd
uses: actions/checkout@v3
with:
path: "/tmp/laconicd/"
repository: cerc-io/laconicd
fetch-depth: 0
ref: main
- name: Environment
run: ls -tlh && env
- name: Build laconicd container
working-directory: /tmp/laconicd/tests/sdk_tests
run: ./build-laconicd-container.sh
- name: Start laconicd container
env:
TEST_AUCTION_ENABLED: true
run: docker compose up laconicd -d
- name: Run registry-cli tests
run: ./test/run-tests.sh
- name: Stop containers
run: docker compose down