Skip to content

Commit

Permalink
test(next): run latest next.js canary test on the CI (#2808)
Browse files Browse the repository at this point in the history
* test(next): run latest next.js canary test on the CI

* Update .github/workflows/test.yml

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>

* ci(actions): update workflow

* Update .github/workflows/test.yml

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
  • Loading branch information
kwonoj and sokra committed Nov 28, 2022
1 parent d79896c commit 26945d6
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,89 @@ jobs:
with:
commit_message: Benchmark result for ${{ steps.date.outputs.pretty }} (${{ github.sha }})

next_js_integration:
needs: [determine_jobs, rust_prepare, rust_build_release]
if: needs.determine_jobs.outputs.rust == 'true'
name: Next.js integration test
runs-on: ubuntu-latest-8-core-oss
strategy:
fail-fast: false
matrix:
node: [16, 18]
group: [1, 2]
env:
# Enabling backtract will makes snapshot tests fail
RUST_BACKTRACE: 0
NEXT_TELEMETRY_DISABLED: 1
NEXT_TEST_JOB: 1
__INTERNAL_CUSTOM_TURBOPACK_BINARY: ${{ github.workspace }}/artifacts/release-x86_64-unknown-linux-musl/next-dev

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

- name: Checkout
uses: actions/checkout@v3
with:
repository: vercel/next.js
ref: v13.0.5-canary.5

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 7.3.0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm

- name: Download binary
uses: actions/download-artifact@v3
with:
path: artifacts

- name: Validate next-dev binary
run: |
chmod +x ${{ github.workspace }}/artifacts/release-x86_64-unknown-linux-musl/next-dev
${{ github.workspace }}/artifacts/release-x86_64-unknown-linux-musl/next-dev --display-version
- name: Install dependencies
run: |
corepack disable
pnpm install
pnpm run build
- run: npm i -g playwright-chromium@1.22.2 && npx playwright install-deps
timeout-minutes: 15

- run: npx @replayio/playwright install chromium

- run: |
chmod +x ${{ github.workspace }}/artifacts/release-x86_64-unknown-linux-musl/next-dev
node run-tests.js --type development --timings -g ${{ matrix.group }}/2
name: Run test/development
env:
RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testDev / Group ${{ matrix.group }}
- run: |
chmod +x ${{ github.workspace }}/artifacts/release-x86_64-unknown-linux-musl/next-dev
node run-tests.js --type e2e --timings -g ${{ matrix.group }}/3
name: Run test/e2e (dev)
env:
RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testDevE2E / Group ${{ matrix.group }} / Node ${{ matrix.node }}
NEXT_TEST_MODE: dev
RECORD_REPLAY_TEST_METRICS: 1
- run: |
chmod +x ${{ github.workspace }}/artifacts/release-x86_64-unknown-linux-musl/next-dev
xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/20
name: Test Integration
env:
RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testIntegration / Group ${{ matrix.group }}
node_lint:
name: Node.js linting
runs-on: ubuntu-latest
Expand Down

0 comments on commit 26945d6

Please sign in to comment.