Skip to content

Commit 9cf2358

Browse files
authored
ci: execute enterprise and non-enterprise e2e tests concurrently (coder#12872)
1 parent 7fd9a75 commit 9cf2358

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

.github/workflows/ci.yaml

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,15 @@ 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+
variant:
439+
- enterprise: false
440+
name: test-e2e
441+
- enterprise: true
442+
name: test-e2e-enterprise
443+
name: ${{ matrix.variant.name }}
435444
steps:
436445
- name: Checkout
437446
uses: actions/checkout@v4
@@ -444,39 +453,34 @@ jobs:
444453
- name: Setup Go
445454
uses: ./.github/actions/setup-go
446455

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
456+
# Assume that the checked-in versions are up-to-date
457+
- run: make gen/mark-fresh
458+
name: make gen
467459

468-
- name: Build
469-
run: |
470-
make -B site/out/index.html
460+
- run: pnpm build
461+
working-directory: site
471462

472463
- run: pnpm playwright:install
473464
working-directory: site
474465

475466
# Run tests that don't require an enterprise license without an enterprise license
476467
- run: pnpm playwright:test --forbid-only --workers 1
468+
if: ${{ !matrix.variant.enterprise }}
469+
env:
470+
DEBUG: pw:api
471+
working-directory: site
472+
473+
# Run all of the tests with an enterprise license
474+
- run: pnpm playwright:test --forbid-only --workers 1
475+
if: ${{ matrix.variant.enterprise }}
477476
env:
478477
DEBUG: pw:api
478+
CODER_E2E_ENTERPRISE_LICENSE: ${{ secrets.CODER_E2E_ENTERPRISE_LICENSE }}
479+
CODER_E2E_REQUIRE_ENTERPRISE_TESTS: "1"
479480
working-directory: site
481+
# Temporarily allow these to fail so that I can gather data about which
482+
# tests are failing.
483+
continue-on-error: true
480484

481485
- name: Upload Playwright Failed Tests
482486
if: always() && github.actor != 'dependabot[bot]' && runner.os == 'Linux' && !github.event.pull_request.head.repo.fork

0 commit comments

Comments
 (0)