diff --git a/.github/workflows/code-coverage.yaml b/.github/workflows/code-coverage.yaml new file mode 100644 index 0000000..fbaab3d --- /dev/null +++ b/.github/workflows/code-coverage.yaml @@ -0,0 +1,32 @@ +name: Code Coverage + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.12 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install '.[tests]' + + - name: Run tests with coverage + run: coverage run -m pytest + + - name: Generate coverage report + run: coverage xml + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }}