Skip to content

Commit

Permalink
Adds testing to backend build ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Jul 31, 2024
1 parent 6ac1607 commit 26cd894
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/backend_build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Backend Build
name: Backend Build and Tests
on:
push:
branches:
- master
- fix/ci-tests
paths:
- "backend/**"
- ".github/workflows/backend_build.yml"
Expand Down Expand Up @@ -115,17 +116,26 @@ jobs:
pip freeze | grep opencv
pip install opencv-python-headless==4.7.0.68
- name: Run tests
- name: Run migrations
env:
TESTING_TOKEN: ${{ secrets.TESTING_TOKEN }}
run: |
cd backend/
export TESTING_TOKEN=$TESTING_TOKEN
python manage.py makemigrations
python manage.py makemigrations core
python manage.py makemigrations login
python manage.py migrate
python manage.py migrate login
python manage.py migrate core
- name : Run tests
env :
TESTING_TOKEN: ${{ secrets.TESTING_TOKEN }}
OSM_CLIENT_ID: ${{ secrets.OSM_CLIENT_ID }}
OSM_CLIENT_SECRET: ${{ secrets.OSM_CLIENT_SECRET }}
OSM_SECRET_KEY: ""

run : |
cd backend/
coverage run manage.py test tests
coverage report

0 comments on commit 26cd894

Please sign in to comment.