From 7b83388637123d54017f39c8bbb7d56f3adc2362 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Tue, 23 Jan 2024 00:47:35 -0600 Subject: [PATCH 1/2] Split tests --- .gitea/workflows/test-importer.yml | 21 +++++++++++ .gitea/workflows/test-rpc.yml | 21 +++++++++++ .gitea/workflows/test-sdk.yml | 58 ++++++++++++++++++++++++++++++ .gitea/workflows/test-unit.yml | 23 ++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 .gitea/workflows/test-importer.yml create mode 100644 .gitea/workflows/test-rpc.yml create mode 100644 .gitea/workflows/test-sdk.yml create mode 100644 .gitea/workflows/test-unit.yml diff --git a/.gitea/workflows/test-importer.yml b/.gitea/workflows/test-importer.yml new file mode 100644 index 00000000..96de9f82 --- /dev/null +++ b/.gitea/workflows/test-importer.yml @@ -0,0 +1,21 @@ +name: Tests +on: + pull_request: + push: + branches: + - main + - release/** + +jobs: + test-importer: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.21 + check-latest: true + - uses: actions/checkout@v3 + - name: test-importer + run: | + make test-import diff --git a/.gitea/workflows/test-rpc.yml b/.gitea/workflows/test-rpc.yml new file mode 100644 index 00000000..79d67b53 --- /dev/null +++ b/.gitea/workflows/test-rpc.yml @@ -0,0 +1,21 @@ +name: Tests +on: + pull_request: + push: + branches: + - main + - release/** + +jobs: + test-rpc: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.21 + check-latest: true + - uses: actions/checkout@v3 + - name: Test rpc endpoint + run: | + make test-rpc diff --git a/.gitea/workflows/test-sdk.yml b/.gitea/workflows/test-sdk.yml new file mode 100644 index 00000000..19594941 --- /dev/null +++ b/.gitea/workflows/test-sdk.yml @@ -0,0 +1,58 @@ +name: Tests +on: + pull_request: + push: + branches: + - main + - release/** + +jobs: + sdk_tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Checkout laconic-sdk + uses: actions/checkout@v3 + with: + path: "./laconic-sdk/" + repository: cerc-io/laconic-sdk + fetch-depth: 0 + ref: main + - name: Environment + run: ls -tlh && env + + - name: Build laconicd container + working-directory: tests/sdk_tests + run: ./build-laconicd-container.sh + + - name: Build laconic-sdk container + working-directory: laconic-sdk + run: ./scripts/build-sdk-test-container.sh + + - name: Start containers + working-directory: tests/sdk_tests + run: docker compose up -d + + - name: Run tests + working-directory: tests/sdk_tests + run: ./run-tests.sh + + - name: Start containers (auctions enabled) + working-directory: tests/sdk_tests + env: + TEST_AUCTION_ENABLED: true + run: docker compose up -d + + - name: Run auction tests + working-directory: tests/sdk_tests + run: ./run-tests.sh test:auctions + + - name: Start containers (expiry enabled) + working-directory: tests/sdk_tests + env: + TEST_REGISTRY_EXPIRY: true + run: docker compose up -d + + - name: Run nameservice expiry tests + working-directory: tests/sdk_tests + run: ./run-tests.sh test:nameservice-expiry diff --git a/.gitea/workflows/test-unit.yml b/.gitea/workflows/test-unit.yml new file mode 100644 index 00000000..f60623d0 --- /dev/null +++ b/.gitea/workflows/test-unit.yml @@ -0,0 +1,23 @@ +name: Tests +on: + pull_request: + push: + branches: + - main + - release/** + +jobs: + test-unit: + # This test case doesn't work in CI, run as root. + env: + SKIP_UNIT_TESTS: TestInitConfigNonNotExistError + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.21 + check-latest: true + - uses: actions/checkout@v3 + - name: Test + run: | + make test-unit -- 2.45.2 From 7958c26d66588e6604852ca12fe19a1e37e4c2d6 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Tue, 23 Jan 2024 00:48:46 -0600 Subject: [PATCH 2/2] Remove file. --- .gitea/workflows/test.yml | 99 --------------------------------------- 1 file changed, 99 deletions(-) delete mode 100644 .gitea/workflows/test.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml deleted file mode 100644 index 86b9fbbb..00000000 --- a/.gitea/workflows/test.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: Tests -on: - pull_request: - push: - branches: - - main - - release/** - -jobs: - test-unit: - # This test case doesn't work in CI, run as root. - env: - SKIP_UNIT_TESTS: TestInitConfigNonNotExistError - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v3 - with: - go-version: 1.21 - check-latest: true - - uses: actions/checkout@v3 - - name: Test - run: | - make test-unit - - test-importer: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/setup-go@v3 - with: - go-version: 1.21 - check-latest: true - - uses: actions/checkout@v3 - - name: test-importer - run: | - make test-import - - test-rpc: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/setup-go@v3 - with: - go-version: 1.21 - check-latest: true - - uses: actions/checkout@v3 - - name: Test rpc endpoint - run: | - make test-rpc - - sdk_tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Checkout laconic-sdk - uses: actions/checkout@v3 - with: - path: "./laconic-sdk/" - repository: cerc-io/laconic-sdk - fetch-depth: 0 - ref: main - - name: Environment - run: ls -tlh && env - - - name: Build laconicd container - working-directory: tests/sdk_tests - run: ./build-laconicd-container.sh - - - name: Build laconic-sdk container - working-directory: laconic-sdk - run: ./scripts/build-sdk-test-container.sh - - - name: Start containers - working-directory: tests/sdk_tests - run: docker compose up -d - - - name: Run tests - working-directory: tests/sdk_tests - run: ./run-tests.sh - - - name: Start containers (auctions enabled) - working-directory: tests/sdk_tests - env: - TEST_AUCTION_ENABLED: true - run: docker compose up -d - - - name: Run auction tests - working-directory: tests/sdk_tests - run: ./run-tests.sh test:auctions - - - name: Start containers (expiry enabled) - working-directory: tests/sdk_tests - env: - TEST_REGISTRY_EXPIRY: true - run: docker compose up -d - - - name: Run nameservice expiry tests - working-directory: tests/sdk_tests - run: ./run-tests.sh test:nameservice-expiry -- 2.45.2