From 02991c71358ebc5226a96cd0cc9ad49905401430 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Tue, 23 Jan 2024 07:19:09 +0000 Subject: [PATCH] Split tests (#139) Split up the test workflows. Reviewed-on: https://git.vdb.to/cerc-io/laconicd/pulls/139 Co-authored-by: Thomas E Lackey Co-committed-by: Thomas E Lackey --- .gitea/workflows/test-importer.yml | 21 +++++++++++ .gitea/workflows/test-rpc.yml | 21 +++++++++++ .gitea/workflows/{test.yml => test-sdk.yml} | 41 --------------------- .gitea/workflows/test-unit.yml | 23 ++++++++++++ 4 files changed, 65 insertions(+), 41 deletions(-) create mode 100644 .gitea/workflows/test-importer.yml create mode 100644 .gitea/workflows/test-rpc.yml rename .gitea/workflows/{test.yml => test-sdk.yml} (61%) 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.yml b/.gitea/workflows/test-sdk.yml similarity index 61% rename from .gitea/workflows/test.yml rename to .gitea/workflows/test-sdk.yml index 86b9fbbb..19594941 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test-sdk.yml @@ -7,47 +7,6 @@ on: - 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: 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