From 65416fd3518e4b9de8c258c1100c867e502fd9af Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Thu, 7 May 2020 11:56:18 +0200 Subject: [PATCH] test: record only if key is present (#38748) --- .github/workflows/cypress.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 401e60ab7f..d400e21565 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -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: @@ -25,14 +28,11 @@ jobs: - name: Set up environment run: cp sample.env .env - + - 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!)