ci(e2e_tests): don't record cypress tests on pull requests from forked repos (#2787)

This commit is contained in:
Erez Rokah 2019-10-23 12:48:07 +03:00 committed by GitHub
parent 8c99ad854d
commit 76fdb93087
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,9 +41,10 @@ jobs:
name: dev-test-website-node-${{ matrix.node-version }}
path: dev-test
e2e:
# non forked workflow (has acceess to build secrets)
e2e-with-cypress-record:
needs: build
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false)
runs-on: ubuntu-latest
strategy:
@ -71,3 +72,30 @@ jobs:
CI: true
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
NODE_OPTIONS: --max-old-space-size=4096
# forked workflow (no acceess to build secrets)
e2e-no-cypress-record:
needs: build
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x
- uses: actions/download-artifact@master
with:
name: dev-test-website-node-10.x
path: dev-test
- name: npm install and e2e test
run: |
node --version
npm --version
yarn --version
yarn
yarn test:e2e:run
env:
CI: true
NODE_OPTIONS: --max-old-space-size=4096