Skip to content

Commit

Permalink
ci: add coverage reporting with Codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
Lei-k committed Jul 24, 2024
1 parent 11970a7 commit e272f9e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/codecov-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy CodeCov

on:
push:
branches:
- main

permissions:
contents: write
pages: write
id-token: write

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
pip pytest-cov codecov
- name: Run tests with coverage
run: |
poetry run pytest --cov=async_pyserial --cov-report=xml --cov-report=term
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella

0 comments on commit e272f9e

Please sign in to comment.