From 4772af495964deb9db7286868d52a8fa305fb65d Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 30 Oct 2024 13:45:39 +0100 Subject: [PATCH] ci: more fine-grained ci, less jobs --- .github/workflows/test.yml | 53 +++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 952175b..5f5bde2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,12 +14,23 @@ permissions: jobs: test-unit: runs-on: ubuntu-latest + steps: + - uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo test --verbose + + test-beta: + runs-on: ubuntu-latest + needs: [test-unit] strategy: fail-fast: false matrix: toolchain: - - stable - beta + - nightly steps: - uses: arduino/setup-protoc@v3 with: @@ -30,6 +41,22 @@ jobs: toolchain: ${{ matrix.toolchain }} - run: cargo test --verbose + test-functional: + needs: [test-unit] + runs-on: ubuntu-latest + steps: + - uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo test --verbose --features=test-e2e + env: + CODEMP_TEST_USERNAME_ALICE: ${{ secrets.CODEMP_TEST_USERNAME_ALICE }} + CODEMP_TEST_PASSWORD_ALICE: ${{ secrets.CODEMP_TEST_PASSWORD_ALICE }} + CODEMP_TEST_USERNAME_BOB: ${{ secrets.CODEMP_TEST_USERNAME_BOB }} + CODEMP_TEST_PASSWORD_BOB: ${{ secrets.CODEMP_TEST_PASSWORD_BOB }} + test-build: needs: [test-unit] runs-on: ${{ matrix.runner }} @@ -45,32 +72,10 @@ jobs: - js - py - luajit - - lua54 - toolchain: - - stable - - beta steps: - uses: arduino/setup-protoc@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.toolchain }} + - uses: dtolnay/rust-toolchain@stable - run: cargo build --release --verbose --features=${{ matrix.features }} - - test-functional: - needs: [test-unit] - runs-on: ubuntu-latest - steps: - - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - - run: cargo test --verbose --features=test-e2e - env: - CODEMP_TEST_USERNAME_ALICE: ${{ secrets.CODEMP_TEST_USERNAME_ALICE }} - CODEMP_TEST_PASSWORD_ALICE: ${{ secrets.CODEMP_TEST_PASSWORD_ALICE }} - CODEMP_TEST_USERNAME_BOB: ${{ secrets.CODEMP_TEST_USERNAME_BOB }} - CODEMP_TEST_PASSWORD_BOB: ${{ secrets.CODEMP_TEST_PASSWORD_BOB }}