Skip to content

Commit

Permalink
Dev: publish backend test results to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lwitkowski committed Aug 3, 2024
1 parent 5dfdff3 commit 93547a9
Showing 4 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/cd-backend.yaml
Original file line number Diff line number Diff line change
@@ -40,6 +40,13 @@ jobs:
run: |
./run_tests.sh
- name: 'Publish Test Results'
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
./backend/test-results/**/*.xml
- name: 'Build Backend API'
working-directory: ./backend
run: |
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -3,4 +3,5 @@
*.log
__pycache__
node_modules
db/prod_dump_2024_06_31.sql
db/prod_dump_2024_06_31.sql
backend/test-results
2 changes: 1 addition & 1 deletion backend/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export PYTHONPATH=$PYTHONPATH':./'

python3 -m unittest -v
python3 -m xmlrunner -o ./test-results

if [[ $? -ne 0 ]]; then
exit 1
1 change: 1 addition & 0 deletions backend/tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@ ddt==1.7.2
psycopg==3.2.1
pytest==8.3.2
testcontainers[postgres]==4.7.2
unittest-xml-reporting==3.2.0

0 comments on commit 93547a9

Please sign in to comment.