Skip to content
Permalink
Browse files
Update test concurrency for CI (#34827)
As discussed [in slack](https://vercel.slack.com/archives/C5MDPQUBU/p1645742977019439?thread_ts=1645562784.286099&cid=C5MDPQUBU) we have more concurrency available to us now and we are currently reaching almost 40 minutes for tests in CI so this parallelizes our jobs more to decrease our test times and leverage this additional concurrency. This brings our CI times closer to around 12 - 15 minutes.
  • Loading branch information
ijjk committed Feb 25, 2022
1 parent c947c93 commit 70ddd154ca611db759b468a4ab83abc4bdd2f30a
Showing with 94 additions and 13 deletions.
  1. +94 −13 .github/workflows/build_test_deploy.yml
@@ -181,7 +181,7 @@ jobs:
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
node-version: 14

@@ -211,7 +211,7 @@ jobs:
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
node-version: 14

@@ -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: ${{needs.build.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=dev node run-tests.js --type e2e
name: Run test/e2e (dev)
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
@@ -265,7 +311,7 @@ jobs:
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
node-version: 14

@@ -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: ${{needs.build.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'}}
@@ -310,11 +392,11 @@ 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
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
node-version: 14

@@ -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
@@ -364,7 +446,7 @@ jobs:
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
node-version: 14

@@ -414,7 +496,7 @@ jobs:
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
node-version: 14

@@ -449,7 +531,7 @@ jobs:
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
node-version: 14

@@ -493,7 +575,7 @@ jobs:
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
node-version: 14

@@ -530,7 +612,7 @@ jobs:
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
node-version: 17
check-latest: true
@@ -563,7 +645,7 @@ jobs:
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
node-version: 14

@@ -598,7 +680,6 @@ jobs:
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
with:
node-version: 14

0 comments on commit 70ddd15

Please sign in to comment.