2022-03-08 15:35:10 +00:00
|
|
|
name: Cypress tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- develop
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- develop
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
cypress-run:
|
|
|
|
name: Run end-to-end tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
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 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:10:53 +00:00
|
|
|
- name: Install root dependencies and run tests
|
2022-03-08 15:47:38 +00:00
|
|
|
run: yarn install
|
2022-03-08 18:10:53 +00:00
|
|
|
- name: Build app
|
|
|
|
run: npx nx affected:e2e --target=build --parallel=3
|
|
|
|
- name: Run E2E tests
|
|
|
|
run: npx nx affected:e2e --target=test --parallel=2 --record --key ${{ secrets.CYPRESS_RECORD_KEY }}
|