From 5c4d292124c3d5345a75b55d473e7a7a4707c9b4 Mon Sep 17 00:00:00 2001 From: Anthony Gomez Date: Wed, 21 Oct 2026 13:04:15 -0400 Subject: [PATCH 1/2] speed up cli CI tests by splitting out the compute tests --- .github/workflows/pr_test.yml | 52 ++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr_test.yml b/.github/workflows/pr_test.yml index 0578bd164..693ccd770 100644 --- a/.github/workflows/pr_test.yml +++ b/.github/workflows/pr_test.yml @@ -48,13 +48,38 @@ jobs: with: version: ${{ env.GOLANGCI_LINT_VERSION }} only-new-issues: true - test: - name: Test (${{ matrix.platform }}) + # The Compute tests change the process working directory, so they cannot use + # t.Parallel(). Instead the slow tests are split into groups across + # parallel jobs, and the "rest" group runs everything else with those tests + # disabled (they are gated by the TEST_COMPUTE_* environment variables). + test-group: + name: Test group (${{ matrix.group }}) strategy: + fail-fast: false matrix: tinygo-version: [0.42.0] node-version: [18] platform: [ubuntu-latest] + group: [build-rust, build-go, build-javascript, build-other, deploy-init, rest] + include: + - group: build-rust + slow: "true" + test_args: -v -timeout 15m -run '^TestBuildRust$' ./pkg/commands/compute/... + - group: build-go + slow: "true" + test_args: -v -timeout 15m -run '^TestBuildGo$' ./pkg/commands/compute/... + - group: build-javascript + slow: "true" + test_args: -v -timeout 15m -run '^TestBuildJavaScript$' ./pkg/commands/compute/... + - group: build-other + slow: "true" + test_args: -v -timeout 15m -run '^(TestBuildPython|TestBuildCPP|TestBuildOther|TestBuildUnknownLanguage)$' ./pkg/commands/compute/... + - group: deploy-init + slow: "true" + test_args: -v -timeout 15m -run '^(TestDeploy|TestInit)$' ./pkg/commands/compute/... + - group: rest + slow: "" + test_args: -v -timeout 15m ./... runs-on: ${{ matrix.platform }} steps: - name: "Checkout code" @@ -98,11 +123,24 @@ jobs: run: make test shell: bash env: - # NOTE: The following lets us focus the test run while debugging. - # TEST_ARGS: "-run TestBuild ./pkg/commands/compute/..." - TEST_COMPUTE_INIT: true - TEST_COMPUTE_BUILD: true - TEST_COMPUTE_DEPLOY: true + TEST_ARGS: ${{ matrix.test_args }} + TEST_COMPUTE_INIT: ${{ matrix.slow }} + TEST_COMPUTE_BUILD: ${{ matrix.slow }} + TEST_COMPUTE_DEPLOY: ${{ matrix.slow }} + test: + name: Test (ubuntu-latest) + needs: test-group + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: "Check group results" + env: + RESULT: ${{ needs.test-group.result }} + run: | + if [ "$RESULT" != "success" ]; then + echo "Test groups finished with result: $RESULT" + exit 1 + fi test-release: name: Test release (${{ matrix.platform }}) if: contains(github.head_ref, 'release') From b34b0c66b1453576034ecaafed4f28e0f14eadb2 Mon Sep 17 00:00:00 2001 From: Anthony Gomez Date: Wed, 21 Oct 2026 14:56:36 -0400 Subject: [PATCH 2/2] fix malformed test commands --- .github/workflows/pr_test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr_test.yml b/.github/workflows/pr_test.yml index 693ccd770..74334652f 100644 --- a/.github/workflows/pr_test.yml +++ b/.github/workflows/pr_test.yml @@ -64,19 +64,19 @@ jobs: include: - group: build-rust slow: "true" - test_args: -v -timeout 15m -run '^TestBuildRust$' ./pkg/commands/compute/... + test_args: -v -timeout 15m -run '^TestBuildRust$$' ./pkg/commands/compute/... - group: build-go slow: "true" - test_args: -v -timeout 15m -run '^TestBuildGo$' ./pkg/commands/compute/... + test_args: -v -timeout 15m -run '^TestBuildGo$$' ./pkg/commands/compute/... - group: build-javascript slow: "true" - test_args: -v -timeout 15m -run '^TestBuildJavaScript$' ./pkg/commands/compute/... + test_args: -v -timeout 15m -run '^TestBuildJavaScript$$' ./pkg/commands/compute/... - group: build-other slow: "true" - test_args: -v -timeout 15m -run '^(TestBuildPython|TestBuildCPP|TestBuildOther|TestBuildUnknownLanguage)$' ./pkg/commands/compute/... + test_args: -v -timeout 15m -run '^(TestBuildPython|TestBuildCPP|TestBuildOther|TestBuildUnknownLanguage)$$' ./pkg/commands/compute/... - group: deploy-init slow: "true" - test_args: -v -timeout 15m -run '^(TestDeploy|TestInit)$' ./pkg/commands/compute/... + test_args: -v -timeout 15m -run '^(TestDeploy|TestInit)$$' ./pkg/commands/compute/... - group: rest slow: "" test_args: -v -timeout 15m ./...