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-24 11:12:28 +00:00
|
|
|
cli_tests:
|
2023-11-22 04:19:39 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-01-24 11:12:28 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [18.x]
|
2023-11-22 04:19:39 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2024-01-24 11:12:28 +00:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2024-01-24 11:32:22 +00:00
|
|
|
registry-url: 'https://registry.npmjs.org/'
|
2024-01-24 11:12:28 +00:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2023-11-22 04:19:39 +00:00
|
|
|
- name: Checkout laconicd
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
2024-01-24 11:12:28 +00:00
|
|
|
path: "/tmp/laconicd/"
|
2023-11-22 04:19:39 +00:00
|
|
|
repository: cerc-io/laconicd
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: main
|
|
|
|
- name: Environment
|
|
|
|
run: ls -tlh && env
|
2024-01-24 11:12:28 +00:00
|
|
|
|
|
|
|
- name: Build laconicd container
|
|
|
|
working-directory: /tmp/laconicd/tests/sdk_tests
|
2023-11-22 04:19:39 +00:00
|
|
|
run: ./build-laconicd-container.sh
|
2024-01-24 11:12:28 +00:00
|
|
|
- name: Start laconicd container
|
|
|
|
env:
|
|
|
|
TEST_AUCTION_ENABLED: true
|
2023-11-22 04:19:39 +00:00
|
|
|
run: docker compose up laconicd -d
|
|
|
|
|
2024-01-24 11:12:28 +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
|