Skip to content

Commit

Permalink
Run backend tests as a github action (#209)
Browse files Browse the repository at this point in the history
* Initial backend tests script

* Only run tests if we're a pull request to main, or a push on main
  • Loading branch information
MelissaAutumn authored Dec 11, 2023
1 parent 801f4bd commit e377ee5
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will install backend's requirements and run tests

name: Run Backend Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
pytest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
cd ./backend
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements-test.txt
- name: Test with pytest
run: |
cd ./backend/test && python -m pytest

0 comments on commit e377ee5

Please sign in to comment.