Skip to content

Commit

Permalink
add testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpdev committed Mar 11, 2024
1 parent 853bdac commit 4982495
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Backend test CI

on:
- pull_request

jobs:
flake8:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
working-directory: ./backend
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Running Django tests
working-directory: ./
run: |
sh run backend/runtests.sh
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ stop:

lint:
docker exec pigeonhole-backend flake8 .
docker exec pigeonhole-frontend npm run lint
docker exec pigeonhole-frontend npm run lint

backendtest:
docker exec -it pigeonhole-backend sh /usr/src/app/backend/runtests.sh
1 change: 1 addition & 0 deletions backend/runtests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage run manage.py test backend/pigeonhole/tests/test_views

0 comments on commit 4982495

Please sign in to comment.