Commit c0eaf98d authored by JJ Kasper's avatar JJ Kasper Committed by Joe Haddad

Update actions config for canary jobs (#10299)

* Update actions config for canary jobs

* Update exiting for mising value and size limit test

* Update config

* Update check

* Update check

* Remove extra check
parent e3ded1ae
......@@ -9,12 +9,12 @@ name: Build, test, and deploy
jobs:
build:
runs-on: ubuntu-latest
env:
NEXT_TELEMETRY_DISABLED: 1
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- run: yarn install --frozen-lockfile --check-files
env:
NEXT_TELEMETRY_DISABLED: 1
- uses: actions/cache@v1
id: cache-build
with:
......@@ -30,13 +30,15 @@ jobs:
with:
path: '.'
key: ${{ github.sha }}
- run: yarn lint
testAll:
name: Test All
runs-on: ubuntu-latest
needs: build
env:
NEXT_TELEMETRY_DISABLED: 1
HEADLESS: true
strategy:
fail-fast: false
matrix:
......@@ -47,11 +49,7 @@ jobs:
with:
path: '.'
key: ${{ github.sha }}
- run: node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3
env:
NEXT_TELEMETRY_DISABLED: 1
HEADLESS: true
testsPass:
name: thank you, next
......@@ -64,48 +62,45 @@ jobs:
name: Test Firefox (production)
runs-on: ubuntu-latest
needs: build
env:
NEXT_TELEMETRY_DISABLED: 1
HEADLESS: true
steps:
- uses: actions/cache@v1
id: restore-build
with:
path: '.'
key: ${{ github.sha }}
- run: yarn testfirefox --forceExit test/integration/production/
env:
NEXT_TELEMETRY_DISABLED: 1
HEADLESS: true
testSafari:
name: Test Safari (production)
runs-on: ubuntu-latest
needs: build
if: github.ref == 'canary'
env:
NEXT_TELEMETRY_DISABLED: 1
BROWSERSTACK: true
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
steps:
- uses: actions/cache@v1
id: restore-build
with:
path: '.'
key: ${{ github.sha }}
- run: yarn testsafari --forceExit test/integration/production/
env:
NEXT_TELEMETRY_DISABLED: 1
BROWSERSTACK: true
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
saveNpmToken:
name: Potentially save npm token
runs-on: ubuntu-latest
if: github.ref == 'canary'
needs: [build, testAll]
steps:
- run: ([[ ! -z $NPM_TOKEN ]] && echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc) || echo "Did not write npm token"
- run: '[[ -z "$BROWSERSTACK_ACCESS_KEY" ]] && echo "Skipping for PR" || yarn testsafari --forceExit test/integration/production/'
publishRelease:
name: Potentially publish release
runs-on: ubuntu-latest
needs: saveNpmToken
needs: [testsPass]
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/cache@v1
id: restore-build
with:
path: '.'
key: ${{ github.sha }}
- run: ./publish-release.sh
#!/bin/sh
#!/bin/bash
if
ls ~/.npmrc >/dev/null 2>&1 &&
[[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];
git describe --exact-match
if [[ ! $? -eq 0 ]];then
echo "Nothing to publish, exiting.."
exit 0;
fi
if [[ -z "$NPM_TOKEN" ]];then
echo "No NPM_TOKEN, exiting.."
exit 0;
fi
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
if [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];
then
# yarn run lerna publish from-git --npm-tag canary --yes
echo "publishing canary"
echo "Publishing canary"
yarn run lerna publish from-git --npm-tag canary --yes
else
echo "Did not publish canary"
fi
if
ls ~/.npmrc >/dev/null 2>&1 &&
[[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];
then
# yarn run lerna publish from-git --yes
echo "publishing stable"
if [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];then
echo "Publishing stable"
yarn run lerna publish from-git --yes
else
echo "Did not publish stable"
fi
......@@ -81,7 +81,7 @@ describe('Production response size', () => {
)
// These numbers are without gzip compression!
const delta = responseSizeKilobytes - 233
const delta = responseSizeKilobytes - 234
expect(delta).toBeLessThanOrEqual(0) // don't increase size
expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment