diff --git a/.github/workflows/codecov-publish.yml b/.github/workflows/codecov-publish.yml new file mode 100644 index 0000000..9e8e486 --- /dev/null +++ b/.github/workflows/codecov-publish.yml @@ -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