Remove typescript errors #72
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: Run API and Frontend Tests | |
on: | |
pull_request: | |
branches: [main] | |
# This is also a reusable workflow that can be called from other workflows | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
test-api: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./backend | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 500 | |
fetch-tags: true | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "poetry" | |
- name: Install API Dependencies | |
run: poetry install --with test | |
- name: Run tests | |
run: poetry run pytest | |
test-frontend: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./frontend | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "npm" | |
cache-dependency-path: frontend/package-lock.json | |
- name: Run npm CI | |
run: npm ci | |
- name: Test frontend | |
run: npm run test -- --no-color --run | |
- name: Run E2E tests | |
uses: cypress-io/github-action@v5 | |
with: | |
install: false | |
start: npm run dev | |
working-directory: ./frontend | |
wait-on: "http://localhost:4040/" |