2022-03-08 15:35:10 +00:00
|
|
|
name: Cypress tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- develop
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2022-03-10 09:37:22 +00:00
|
|
|
master:
|
2022-03-10 09:40:40 +00:00
|
|
|
name: Run end-to-end tests - main
|
2022-03-08 15:35:10 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-03-10 09:37:22 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Derive appropriate SHAs for base and head for `nx affected` commands
|
|
|
|
uses: nrwl/nx-set-shas@v2
|
|
|
|
with:
|
|
|
|
main-branch-name: master
|
|
|
|
- name: Use Node.js 16
|
|
|
|
id: Node
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
- name: Install root dependencies
|
|
|
|
run: yarn install
|
|
|
|
- name: Run Cypress tests
|
|
|
|
run: npx nx affected:e2e --parallel=5 --record --key ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
|
|
pr:
|
2022-03-10 09:40:40 +00:00
|
|
|
name: Run end-to-end tests - PR
|
2022-03-10 09:37:22 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: ${{ github.event_name == 'pull_request' }}
|
2022-03-08 15:35:10 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2022-03-08 18:35:00 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.ref }}
|
|
|
|
fetch-depth: 0
|
2022-03-08 18:06:54 +00:00
|
|
|
- name: Derive appropriate SHAs for base and head for `nx affected` commands
|
|
|
|
uses: nrwl/nx-set-shas@v2
|
2022-03-08 18:40:57 +00:00
|
|
|
with:
|
|
|
|
main-branch-name: master
|
2022-03-08 15:35:10 +00:00
|
|
|
- name: Use Node.js 16
|
|
|
|
id: Node
|
2022-03-08 18:06:54 +00:00
|
|
|
uses: actions/setup-node@v2
|
2022-03-08 15:35:10 +00:00
|
|
|
with:
|
|
|
|
node-version: 16
|
2022-03-08 18:51:19 +00:00
|
|
|
- name: Install root dependencies
|
2022-03-08 15:47:38 +00:00
|
|
|
run: yarn install
|
2022-03-08 18:51:19 +00:00
|
|
|
- name: Run Cypress tests
|
|
|
|
run: npx nx affected:e2e --parallel=5 --record --key ${{ secrets.CYPRESS_RECORD_KEY }}
|