Skip to content

Add coverage badge creation to CI workflow. #3

Add coverage badge creation to CI workflow.

Add coverage badge creation to CI workflow. #3

Workflow file for this run

name: Tests

Check failure on line 1 in .github/workflows/tests.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/tests.yaml

Invalid workflow file

(Line: 23, Col: 9): 'run' is already defined
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: write # required to commit the badge
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install package
run: python -m pip install --upgrade pip setuptools wheel
run: pip install -e .[dev]
- name: Run tests with coverage
run: pytest --cov=pome --cov-report=xml
- name: Generate coverage badge
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
uses: we-cli/coverage-badge-action@main