Skip to content

Commit

Permalink
Added coverage workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mbsantiago committed Jul 16, 2023
1 parent 13f87e3 commit 77dd6bf
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Coverage

on:
push:
branches: ["main"]

pull_request:
branches: ["main"]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest hypothesis coverage pytest-coverage
python -m pip install .
- name: Run Tests
run: |
pytest tests -v --cov-config .coveragerc --cov=src/soundevent/ -l --tb=sort --maxfail=1 tests/
coverage xml
coverage html
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 77dd6bf

Please sign in to comment.