diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b780d6585..52410ecd6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -109,9 +109,18 @@ jobs: - name: Unit Tests run: yarn test:ci - cli-e2e: + cli-e2e-matrix: runs-on: ubuntu-latest needs: [yarn-install] + strategy: + fail-fast: false + matrix: + test: + - core + - relay + - warp-read + - warp-apply + - warp-deploy steps: - uses: actions/checkout@v4 with: @@ -130,8 +139,21 @@ jobs: - name: Checkout registry uses: ./.github/actions/checkout-registry - - name: CLI e2e tests + - name: CLI e2e tests (${{ matrix.test }}) run: yarn --cwd typescript/cli test:e2e + env: + CLI_E2E_TEST: ${{ matrix.test }} + + cli-e2e: + runs-on: ubuntu-latest + needs: cli-e2e-matrix + if: always() + steps: + - name: Check cli-e2e matrix status + if: ${{ needs.cli-e2e-matrix.result != 'success' }} + run: | + echo "CLI E2E tests failed" + exit 1 agent-configs: runs-on: ubuntu-latest diff --git a/typescript/cli/.mocharc-e2e.json b/typescript/cli/.mocharc-e2e.json index ecabac62f..0f8803e7a 100644 --- a/typescript/cli/.mocharc-e2e.json +++ b/typescript/cli/.mocharc-e2e.json @@ -1,6 +1,5 @@ { "extensions": ["ts"], - "spec": ["src/**/*.e2e-test.ts"], "node-option": [ "experimental-specifier-resolution=node", "loader=ts-node/esm" diff --git a/typescript/cli/scripts/run-e2e-test.sh b/typescript/cli/scripts/run-e2e-test.sh index bfa89a0b3..c98fc9158 100755 --- a/typescript/cli/scripts/run-e2e-test.sh +++ b/typescript/cli/scripts/run-e2e-test.sh @@ -16,7 +16,12 @@ anvil --chain-id 31338 -p 8555 --state /tmp/anvil2/state --gas-price 1 > /dev/nu anvil --chain-id 31347 -p 8600 --state /tmp/anvil3/state --gas-price 1 > /dev/null & echo "Running E2E tests" -yarn mocha --config .mocharc-e2e.json +if [ -n "${CLI_E2E_TEST}" ]; then + echo "Running only ${CLI_E2E_TEST} test" + yarn mocha --config .mocharc-e2e.json "src/**/${CLI_E2E_TEST}.e2e-test.ts" +else + yarn mocha --config .mocharc-e2e.json "src/**/*.e2e-test.ts" +fi cleanup