2022-11-04 13:13:54 +00:00
|
|
|
name: Cypress - stats
|
|
|
|
|
|
|
|
on: workflow_call
|
2022-11-08 10:33:22 +00:00
|
|
|
|
2022-11-04 13:13:54 +00:00
|
|
|
jobs:
|
|
|
|
stats-e2e:
|
|
|
|
runs-on: self-hosted
|
|
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
|
|
|
# Checkout front ends
|
|
|
|
- name: Checkout frontend mono repo
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
path: './frontend-monorepo'
|
|
|
|
|
|
|
|
# Restore node_modules from cache if possible
|
|
|
|
- name: Restore node_modules from cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
frontend-monorepo/node_modules
|
|
|
|
/home/runner/.cache/Cypress
|
|
|
|
key: node_modules_cypress-${{ hashFiles('frontend-monorepo/yarn.lock') }}
|
|
|
|
|
2022-11-08 10:33:22 +00:00
|
|
|
# Install frontend dependencies
|
|
|
|
- name: Install root dependencies
|
|
|
|
run: yarn install --frozen-lockfile
|
|
|
|
working-directory: frontend-monorepo
|
|
|
|
|
2022-11-04 13:13:54 +00:00
|
|
|
# To make sure that all Cypress binaries are installed properly
|
|
|
|
- name: Install cypress bins
|
|
|
|
run: yarn cypress install
|
|
|
|
working-directory: frontend-monorepo
|
|
|
|
|
|
|
|
- name: Run Cypress tests
|
|
|
|
run: npx nx run stats-e2e:e2e --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --browser chrome
|
|
|
|
working-directory: frontend-monorepo
|
|
|
|
env:
|
|
|
|
CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }}
|