fixing tests and moving routes and models to their own directories #59
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: Test Automation | |
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 ci && npm run format | |
jest-run: | |
runs-on: ubuntu-latest | |
needs: [format-and-setup] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Run jest tests | |
run: npm run jest | |
postman-run: | |
runs-on: ubuntu-latest | |
needs: [format-and-setup] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Run postman tests | |
run: npm run postman | |
k6-run: | |
runs-on: ubuntu-latest | |
needs: [format-and-setup] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Run k6 tests | |
uses: grafana/k6-action@v0.2.0 | |
with: | |
filename: k6/tests/baseline-test.js | |
cypress-run-chrome: | |
runs-on: ubuntu-latest | |
needs: [format-and-setup] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Run cypress tests in CHROME | |
uses: cypress-io/github-action@v6 | |
with: | |
browser: chrome | |
cypress-run-edge: | |
runs-on: ubuntu-latest | |
needs: [format-and-setup] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Run cypress tests in EDGE | |
uses: cypress-io/github-action@v6 | |
with: | |
browser: edge | |
cypress-run-electron: | |
runs-on: ubuntu-latest | |
needs: [format-and-setup] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Run cypress tests in ELECTRON | |
uses: cypress-io/github-action@v6 | |
with: | |
browser: electron |