Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test concurrency for CI #34827

Merged
merged 8 commits into from Feb 25, 2022
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
86 changes: 84 additions & 2 deletions .github/workflows/build_test_deploy.yml
Expand Up @@ -241,6 +241,52 @@ jobs:
name: Run test/development
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- name: Upload test trace
if: always()
uses: actions/upload-artifact@v2
with:
name: test-trace
if-no-files-found: ignore
retention-days: 2
path: |
test/traces

testDevE2E:
name: Test Development (E2E)
runs-on: ubuntu-latest
needs: [build, build-native-dev]
env:
NEXT_TELEMETRY_DISABLED: 1
NEXT_TEST_JOB: 1
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
ijjk marked this conversation as resolved.
Show resolved Hide resolved
with:
node-version: 14

- run: echo ${{needs.build.outputs.docsChange}}

# https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off

- uses: actions/cache@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
id: restore-build
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }}

- uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
name: next-swc-dev-binary
path: packages/next-swc/native

- run: npm i -g playwright-chromium@1.14.1 && npx playwright install-deps
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: NEXT_TEST_MODE=dev node run-tests.js --type e2e
name: Run test/e2e (dev)
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
Expand Down Expand Up @@ -295,6 +341,42 @@ jobs:
name: Run test/production
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

testProdE2E:
name: Test Production (E2E)
runs-on: ubuntu-latest
needs: [build, build-native-dev]
env:
NEXT_TELEMETRY_DISABLED: 1
NEXT_TEST_JOB: 1
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
with:
node-version: 14

- run: echo ${{needs.build.outputs.docsChange}}

# https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off

- uses: actions/cache@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
id: restore-build
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }}

- uses: actions/download-artifact@v2
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
name: next-swc-dev-binary
path: packages/next-swc/native

- run: npm i -g playwright-chromium@1.14.1 && npx playwright install-deps
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: NEXT_TEST_MODE=start node run-tests.js --type e2e
name: Run test/e2e (production)
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
Expand All @@ -310,7 +392,7 @@ jobs:
strategy:
fail-fast: false
matrix:
group: [1, 2, 3, 4, 5, 6]
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
steps:
- name: Setup node
uses: actions/setup-node@v2
Expand Down Expand Up @@ -340,7 +422,7 @@ jobs:
- run: npm i -g playwright-chromium@1.14.1 && npx playwright install-deps
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/6
- run: xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/18
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- name: Upload test trace
Expand Down