ci(e2e_tests): don't record cypress tests on pull requests from forked repos (#2787)
This commit is contained in:
parent
8c99ad854d
commit
76fdb93087
32
.github/workflows/nodejs.yml
vendored
32
.github/workflows/nodejs.yml
vendored
@ -41,9 +41,10 @@ jobs:
|
|||||||
name: dev-test-website-node-${{ matrix.node-version }}
|
name: dev-test-website-node-${{ matrix.node-version }}
|
||||||
path: dev-test
|
path: dev-test
|
||||||
|
|
||||||
e2e:
|
# non forked workflow (has acceess to build secrets)
|
||||||
|
e2e-with-cypress-record:
|
||||||
needs: build
|
needs: build
|
||||||
|
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
@ -71,3 +72,30 @@ jobs:
|
|||||||
CI: true
|
CI: true
|
||||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||||||
NODE_OPTIONS: --max-old-space-size=4096
|
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
|
Loading…
x
Reference in New Issue
Block a user