2023-03-29 23:12:24 +00:00
|
|
|
name: Tests
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- release/**
|
|
|
|
|
|
|
|
env:
|
2023-04-20 19:36:32 +00:00
|
|
|
DOCKER_HOST: unix:///var/run/dind.sock
|
2023-03-29 23:12:24 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
sdk_tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Checkout laconicd
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
path: "./laconicd/"
|
|
|
|
repository: cerc-io/laconicd
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: main
|
|
|
|
- name: Environment
|
|
|
|
run: ls -tlh && env
|
2024-01-16 09:04:37 +00:00
|
|
|
|
2023-03-29 23:12:24 +00:00
|
|
|
- name: Start dockerd
|
|
|
|
run: |
|
2023-04-20 19:32:44 +00:00
|
|
|
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
2023-03-29 23:12:24 +00:00
|
|
|
sleep 5
|
2024-01-16 09:04:37 +00:00
|
|
|
|
|
|
|
- name: Build laconicd container
|
2023-03-29 23:12:24 +00:00
|
|
|
working-directory: laconicd/tests/sdk_tests
|
|
|
|
run: ./build-laconicd-container.sh
|
2024-01-16 09:04:37 +00:00
|
|
|
- name: Build laconic-sdk container
|
|
|
|
run: ./scripts/build-sdk-test-container.sh
|
|
|
|
|
|
|
|
- name: Start containers
|
2023-03-29 23:12:24 +00:00
|
|
|
working-directory: laconicd/tests/sdk_tests
|
|
|
|
run: docker compose up -d
|
2024-01-16 09:04:37 +00:00
|
|
|
- name: Run tests
|
2023-03-29 23:12:24 +00:00
|
|
|
working-directory: laconicd/tests/sdk_tests
|
2024-01-16 09:04:37 +00:00
|
|
|
run: ./run-tests.sh
|
|
|
|
|
|
|
|
- name: Start containers (auctions enabled)
|
2023-03-29 23:12:24 +00:00
|
|
|
working-directory: laconicd/tests/sdk_tests
|
2024-01-16 09:04:37 +00:00
|
|
|
env:
|
|
|
|
TEST_AUCTION_ENABLED: true
|
|
|
|
run: docker compose up -d
|
|
|
|
- name: Run auction tests
|
2023-03-29 23:12:24 +00:00
|
|
|
working-directory: laconicd/tests/sdk_tests
|
2024-01-16 09:04:37 +00:00
|
|
|
run: ./run-tests.sh test:auctions
|
|
|
|
|
|
|
|
- name: Start containers (expiry enabled)
|
2023-03-29 23:12:24 +00:00
|
|
|
working-directory: laconicd/tests/sdk_tests
|
2024-01-16 09:04:37 +00:00
|
|
|
env:
|
|
|
|
TEST_REGISTRY_EXPIRY: true
|
|
|
|
run: docker compose up -d
|
|
|
|
- name: Run nameservice expiry tests
|
2023-03-29 23:12:24 +00:00
|
|
|
working-directory: laconicd/tests/sdk_tests
|
2024-01-16 09:04:37 +00:00
|
|
|
run: ./run-tests.sh test:nameservice-expiry
|