Skip to content

Commit

Permalink
add CI codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
saxix committed Oct 18, 2024
1 parent b7f30ee commit 305ebf5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,22 +142,25 @@ jobs:
-f docker/Dockerfile .
- name: Run Test suite
run: |
mkdir output
docker run --rm \
--network host \
-e PYTHONPATH=/app/src \
-e DATABASE_URL=${DATABASE_URL} \
-v "./output/:/app/output" \
-v "./src/:/app/src" \
-v "./tests:/app/tests" \
-v "./pytest.ini:/app/pytest.ini" \
-t "unicef/hope-country-workspace:${{env.BRANCH}}-test-${{env.checksum}}" \
pytest -c /app/pytest.ini tests/ -v --maxfail=5 --migrations --cov
pytest -c /app/pytest.ini tests/ -v --maxfail=5 --migrations --cov --cov-report xml:/app/coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
continue-on-error: true
with:
env_vars: OS,PYTHON
fail_ci_if_error: true
files: coverage.xml
files: /output/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: false
name: codecov-${{env.GITHUB_REF_NAME}}
Expand Down

0 comments on commit 305ebf5

Please sign in to comment.