test: record only if key is present (#38748)

This commit is contained in:
Oliver Eyton-Williams
2020-05-07 11:56:18 +02:00
committed by GitHub
parent dab119f2be
commit 65416fd351

View File

@ -11,6 +11,9 @@ on:
- master
jobs:
cypress-run:
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Cypress run
runs-on: ubuntu-latest
services:
@ -28,11 +31,8 @@ jobs:
- name: Cypress run
uses: cypress-io/github-action@v1
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
record: true
record: ${{ env.CYPRESS_RECORD_KEY != 0 }}
build: npm run build
# this should mirror the production build, but for now we're just using the dev
# server and gatsby serve instead (the npm script serve:client needs updating!)