Skip to content

Commit

Permalink
Added code coverage workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedNasser8 committed Sep 16, 2024
1 parent e78d9e2 commit ce92652
Show file tree
Hide file tree
Showing 4 changed files with 410 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test Coverage

on:
push
pull_request

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: '1.8.3'

- name: Install dependencies
run: poetry install

- name: Run tests coverage
run: |
poetry run pytest
poetry run coverage report
poetry run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
Loading

0 comments on commit ce92652

Please sign in to comment.