2023-11-22 04:19:39 +00:00
|
|
|
name: Tests
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- release/**
|
|
|
|
|
|
|
|
env:
|
|
|
|
DOCKER_HOST: unix:///var/run/dind.sock
|
|
|
|
|
|
|
|
jobs:
|
2024-01-29 04:46:32 +00:00
|
|
|
cli_tests:
|
2023-11-22 04:19:39 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-01-29 04:46:32 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [18.x]
|
2023-11-22 04:19:39 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2024-01-29 04:46:32 +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: Set registry
|
|
|
|
run: npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
|
|
|
|
|
|
|
- name: Install dependencies and build
|
|
|
|
run: yarn && yarn build
|
|
|
|
- name: Install registry-cli
|
|
|
|
run: yarn global add file:$PWD
|
|
|
|
|
2024-03-18 13:58:52 +00:00
|
|
|
- name: Checkout laconic2d
|
2023-11-22 04:19:39 +00:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
2024-03-18 13:58:52 +00:00
|
|
|
path: "./laconic2d/"
|
|
|
|
repository: cerc-io/laconic2d
|
2023-11-22 04:19:39 +00:00
|
|
|
fetch-depth: 0
|
|
|
|
ref: main
|
2024-01-29 04:46:32 +00:00
|
|
|
|
2024-03-18 13:58:52 +00:00
|
|
|
- name: Build laconic2d container
|
|
|
|
working-directory: ./laconic2d/tests/sdk_tests
|
|
|
|
run: ./build-laconic2d-container.sh
|
|
|
|
- name: Start laconic2d container
|
2024-01-29 04:46:32 +00:00
|
|
|
env:
|
|
|
|
TEST_AUCTION_ENABLED: true
|
2024-03-18 13:58:52 +00:00
|
|
|
run: docker compose up laconic2d -d
|
2023-11-22 04:19:39 +00:00
|
|
|
|
2024-01-29 04:46:32 +00:00
|
|
|
- name: Run registry-cli tests
|
|
|
|
run: ./test/run-tests.sh
|
|
|
|
|
|
|
|
- name: Stop containers
|
2023-11-22 04:19:39 +00:00
|
|
|
run: docker compose down
|