adding cypress mobile tests #150
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: Time of Day | |
on: | |
push: | |
branches: ['develop', 'main'] | |
pull_request: | |
branches: ['develop', 'main'] | |
workflow_dispatch: | |
jobs: | |
format-and-setup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Run Format | |
run: npm run format-check | |
- name: Install Dependencies | |
run: npm ci | |
jest-run: | |
runs-on: ubuntu-latest | |
needs: [format-and-setup] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run jest tests | |
run: npm run test | |
api-run: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
needs: [format-and-setup] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run api tests | |
run: npm run api-test | |
cypress-run: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
needs: [format-and-setup, jest-run, api-run] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Cypress Tests | |
run: npm run cy:pipeline-run |