Skip to content

Commit c01651c

Browse files
committed
test: run enterprise and non-enterprise tests in parallel in ci
1 parent 90efa1b commit c01651c

File tree

1 file changed

+12
-21
lines changed

1 file changed

+12
-21
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,14 @@ jobs:
432432
needs: changes
433433
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
434434
timeout-minutes: 20
435+
strategy:
436+
fail-fast: false
437+
matrix:
438+
- enterprise: false
439+
name: test-e2e
440+
- enterprise: true
441+
name: test-e2e-enterprise
442+
name: ${{ matrix.name }}
435443
steps:
436444
- name: Checkout
437445
uses: actions/checkout@v4
@@ -444,45 +452,28 @@ jobs:
444452
- name: Setup Go
445453
uses: ./.github/actions/setup-go
446454

447-
- name: Setup Terraform
448-
uses: ./.github/actions/setup-tf
449-
450-
- name: go install tools
451-
run: |
452-
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30
453-
go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33
454-
go install golang.org/x/tools/cmd/goimports@latest
455-
go install github.com/mikefarah/yq/v4@v4.30.6
456-
go install go.uber.org/mock/mockgen@v0.4.0
457-
458-
- name: Install Protoc
459-
run: |
460-
mkdir -p /tmp/proto
461-
pushd /tmp/proto
462-
curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.3/protoc-23.3-linux-x86_64.zip
463-
unzip protoc.zip
464-
cp -r ./bin/* /usr/local/bin
465-
cp -r ./include /usr/local/bin/include
466-
popd
467-
468455
- name: Build
469456
run: |
457+
make gen/mark-fresh # Assume that the checked-in versions are up-to-date
470458
make -B site/out/index.html
471459
472460
- run: pnpm playwright:install
473461
working-directory: site
474462

475463
# Run tests that don't require an enterprise license without an enterprise license
476464
- run: pnpm playwright:test --forbid-only --workers 1
465+
if: !matrix.enterprise
477466
env:
478467
DEBUG: pw:api
479468
working-directory: site
480469

481470
# Run all of the tests with an enterprise license
482471
- run: pnpm playwright:test --forbid-only --workers 1
472+
if: matrix.enterprise
483473
env:
484474
DEBUG: pw:api
485475
CODER_E2E_ENTERPRISE_LICENSE: ${{ secrets.CODER_E2E_ENTERPRISE_LICENSE }}
476+
CODER_E2E_REQUIRE_ENTERPRISE_TESTS: "1"
486477
working-directory: site
487478

488479
- name: Upload Playwright Failed Tests

0 commit comments

Comments
 (0)