Skip to content

Commit

Permalink
Merge pull request #44 from stuartmaxwell/codecoverage-action
Browse files Browse the repository at this point in the history
Codecoverage action
  • Loading branch information
stuartmaxwell authored Oct 30, 2024
2 parents c111484 + 9ec1a10 commit d9e66be
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Coverage

on: push

permissions:
contents: read

jobs:
test:
name: Run tests and collect coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v2

- name: Set up Python
run: uv python install

- name: Install the project
run: uv sync --no-dev --extra test

- name: Run tests
run: uv run pytest --cov --cov-report=xml

- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Test

on: [push, pull_request]
on: push

permissions:
contents: read
Expand Down

0 comments on commit d9e66be

Please sign in to comment.