Tests (Hosted Prod) #11838
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests (Hosted Prod) | |
on: | |
workflow_dispatch: | |
inputs: | |
tags: | |
description: "Ignore me" | |
required: false | |
type: boolean | |
schedule: | |
# run every hour during business hours (UTC time) | |
- cron: "0 0,16-23 * * 1-5" | |
# run every 3 hours outside of business hours | |
- cron: "0 1-15/3 * * 1-5" | |
# run every 3 hours on weekends | |
- cron: "0 */3 * * 6,0" | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: tests-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Enable Corepack | |
run: corepack enable | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
run: yarn | |
- name: Cypress run hosted tests | |
uses: cypress-io/github-action@v6 | |
with: | |
install: false | |
browser: chrome | |
config-file: cypress.config.ts | |
env: | |
CYPRESS_TEST_USERNAME: ${{ secrets.CYPRESS_TEST_USERNAME }} | |
CYPRESS_TEST_PASSWORD: ${{ secrets.CYPRESS_TEST_PASSWORD }} | |
- name: Save screenshots of failed tests | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
retention-days: 7 |