2020-01-27 21:07:31 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [canary]
|
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize]
|
|
|
|
|
|
|
|
name: Build, test, and deploy
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2020-01-28 05:48:52 +01:00
|
|
|
env:
|
|
|
|
NEXT_TELEMETRY_DISABLED: 1
|
2020-01-27 21:07:31 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-01-28 05:48:52 +01:00
|
|
|
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
2020-01-27 21:07:31 +01:00
|
|
|
- run: yarn install --frozen-lockfile --check-files
|
2020-07-23 06:06:50 +02:00
|
|
|
- uses: actions/cache@v2
|
2020-01-27 21:07:31 +01:00
|
|
|
id: cache-build
|
|
|
|
with:
|
2020-07-23 06:06:50 +02:00
|
|
|
path: ./*
|
2020-01-27 21:07:31 +01:00
|
|
|
key: ${{ github.sha }}
|
|
|
|
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
steps:
|
2020-07-23 06:06:50 +02:00
|
|
|
- uses: actions/cache@v2
|
2020-01-27 21:07:31 +01:00
|
|
|
id: restore-build
|
|
|
|
with:
|
2020-07-23 06:06:50 +02:00
|
|
|
path: ./*
|
2020-01-27 21:07:31 +01:00
|
|
|
key: ${{ github.sha }}
|
|
|
|
- run: yarn lint
|
|
|
|
|
2020-04-07 15:42:16 +02:00
|
|
|
checkPrecompiled:
|
|
|
|
name: Check Pre-compiled
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
env:
|
|
|
|
NEXT_TELEMETRY_DISABLED: 1
|
|
|
|
steps:
|
2020-07-23 06:06:50 +02:00
|
|
|
- uses: actions/cache@v2
|
2020-04-07 15:42:16 +02:00
|
|
|
id: restore-build
|
|
|
|
with:
|
2020-07-23 06:06:50 +02:00
|
|
|
path: ./*
|
2020-04-07 15:42:16 +02:00
|
|
|
key: ${{ github.sha }}
|
|
|
|
- run: ./check-pre-compiled.sh
|
|
|
|
|
2020-01-27 21:07:31 +01:00
|
|
|
testAll:
|
|
|
|
name: Test All
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
2020-01-28 05:48:52 +01:00
|
|
|
env:
|
|
|
|
NEXT_TELEMETRY_DISABLED: 1
|
2020-03-04 09:54:49 +01:00
|
|
|
NEXT_TEST_JOB: 1
|
2020-01-28 05:48:52 +01:00
|
|
|
HEADLESS: true
|
2020-01-27 21:07:31 +01:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
group: [1, 2, 3, 4, 5, 6]
|
|
|
|
steps:
|
2020-07-23 06:06:50 +02:00
|
|
|
- uses: actions/cache@v2
|
2020-01-27 21:07:31 +01:00
|
|
|
id: restore-build
|
|
|
|
with:
|
2020-07-23 06:06:50 +02:00
|
|
|
path: ./*
|
2020-01-27 21:07:31 +01:00
|
|
|
key: ${{ github.sha }}
|
2020-02-01 01:57:58 +01:00
|
|
|
|
|
|
|
# TODO: remove after we fix watchpack watching too much
|
|
|
|
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
|
|
|
|
2020-01-27 21:07:31 +01:00
|
|
|
- run: node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3
|
|
|
|
|
|
|
|
testsPass:
|
2020-01-27 21:19:44 +01:00
|
|
|
name: thank you, next
|
2020-01-27 21:07:31 +01:00
|
|
|
runs-on: ubuntu-latest
|
2020-04-07 15:42:16 +02:00
|
|
|
needs: [lint, checkPrecompiled, testAll]
|
2020-01-27 21:07:31 +01:00
|
|
|
steps:
|
|
|
|
- run: exit 0
|
|
|
|
|
2020-07-21 17:50:49 +02:00
|
|
|
testMacOS:
|
|
|
|
name: macOS ( Basic, Production, Acceptance )
|
|
|
|
runs-on: macos-latest
|
|
|
|
needs: build
|
|
|
|
env:
|
|
|
|
NEXT_TELEMETRY_DISABLED: 1
|
|
|
|
NEXT_TEST_JOB: 1
|
|
|
|
HEADLESS: true
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
|
|
|
# Installing dependencies again since OS changed
|
|
|
|
- run: yarn install --frozen-lockfile --check-files
|
|
|
|
- run: node run-tests.js test/integration/production/test/index.test.js
|
|
|
|
- run: node run-tests.js test/integration/basic/test/index.test.js
|
|
|
|
- run: node run-tests.js test/acceptance/*
|
|
|
|
|
2020-01-27 21:07:31 +01:00
|
|
|
testFirefox:
|
|
|
|
name: Test Firefox (production)
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
2020-01-28 05:48:52 +01:00
|
|
|
env:
|
|
|
|
HEADLESS: true
|
2020-05-15 22:13:37 +02:00
|
|
|
BROWSERNAME: 'firefox'
|
|
|
|
NEXT_TELEMETRY_DISABLED: 1
|
2020-01-27 21:07:31 +01:00
|
|
|
steps:
|
2020-07-23 06:06:50 +02:00
|
|
|
- uses: actions/cache@v2
|
2020-01-27 21:07:31 +01:00
|
|
|
id: restore-build
|
|
|
|
with:
|
2020-07-23 06:06:50 +02:00
|
|
|
path: ./*
|
2020-01-27 21:07:31 +01:00
|
|
|
key: ${{ github.sha }}
|
2020-05-15 22:13:37 +02:00
|
|
|
- run: node run-tests.js test/integration/production/test/index.test.js
|
2020-01-27 21:07:31 +01:00
|
|
|
|
|
|
|
testSafari:
|
|
|
|
name: Test Safari (production)
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
2020-01-28 05:48:52 +01:00
|
|
|
env:
|
|
|
|
BROWSERSTACK: true
|
2020-05-15 22:13:37 +02:00
|
|
|
BROWSERNAME: 'safari'
|
2020-02-20 19:35:28 +01:00
|
|
|
NEXT_TELEMETRY_DISABLED: 1
|
2020-01-28 20:04:00 +01:00
|
|
|
SKIP_LOCAL_SELENIUM_SERVER: true
|
2020-01-28 05:48:52 +01:00
|
|
|
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
|
|
|
|
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
|
2020-01-27 21:07:31 +01:00
|
|
|
steps:
|
2020-07-23 06:06:50 +02:00
|
|
|
- uses: actions/cache@v2
|
2020-01-27 21:07:31 +01:00
|
|
|
id: restore-build
|
|
|
|
with:
|
2020-07-23 06:06:50 +02:00
|
|
|
path: ./*
|
2020-01-27 21:07:31 +01:00
|
|
|
key: ${{ github.sha }}
|
2020-05-15 22:13:37 +02:00
|
|
|
- run: '[[ -z "$BROWSERSTACK_ACCESS_KEY" ]] && echo "Skipping for PR" || node run-tests.js test/integration/production/test/index.test.js'
|
2020-01-27 21:07:31 +01:00
|
|
|
|
2020-02-20 19:35:28 +01:00
|
|
|
testSafariOld:
|
|
|
|
name: Test Safari 10.1 (nav)
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [build, testSafari]
|
|
|
|
env:
|
|
|
|
BROWSERSTACK: true
|
|
|
|
LEGACY_SAFARI: true
|
2020-05-15 22:13:37 +02:00
|
|
|
BROWSERNAME: 'safari'
|
2020-02-20 19:35:28 +01:00
|
|
|
NEXT_TELEMETRY_DISABLED: 1
|
|
|
|
SKIP_LOCAL_SELENIUM_SERVER: true
|
|
|
|
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
|
|
|
|
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
|
|
|
|
steps:
|
2020-07-23 06:06:50 +02:00
|
|
|
- uses: actions/cache@v2
|
2020-02-20 19:35:28 +01:00
|
|
|
id: restore-build
|
|
|
|
with:
|
2020-07-23 06:06:50 +02:00
|
|
|
path: ./*
|
2020-02-20 19:35:28 +01:00
|
|
|
key: ${{ github.sha }}
|
2020-05-15 22:13:37 +02:00
|
|
|
- run: '[[ -z "$BROWSERSTACK_ACCESS_KEY" ]] && echo "Skipping for PR" || node run-tests.js test/integration/production-nav/test/index.test.js'
|
2020-02-20 19:35:28 +01:00
|
|
|
|
2020-01-27 21:07:31 +01:00
|
|
|
publishRelease:
|
|
|
|
name: Potentially publish release
|
|
|
|
runs-on: ubuntu-latest
|
2020-01-28 05:48:52 +01:00
|
|
|
needs: [testsPass]
|
|
|
|
env:
|
|
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2020-01-27 21:07:31 +01:00
|
|
|
steps:
|
2020-07-23 06:06:50 +02:00
|
|
|
- uses: actions/cache@v2
|
2020-01-28 05:48:52 +01:00
|
|
|
id: restore-build
|
|
|
|
with:
|
2020-07-23 06:06:50 +02:00
|
|
|
path: ./*
|
2020-01-28 05:48:52 +01:00
|
|
|
key: ${{ github.sha }}
|
|
|
|
|
2020-01-27 21:07:31 +01:00
|
|
|
- run: ./publish-release.sh
|