👷 Remove codecov integration and produce reports instead #89
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
test-and-publish-flow: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Run Poetry image | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: 1.7.1 | |
- name: Install library | |
run: poetry install --no-interaction | |
- name: Run tests | |
run: poetry run pytest --cov-report xml:coverage.xml | |
- name: Get Cover | |
uses: orgoro/[email protected] | |
with: | |
coverageFile: coverage.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# publish version only when pyproject.toml is changed in master | |
- name: Filter changes in pyproject | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
root: | |
- 'pyproject.toml' | |
- if: ${{ (github.ref == 'refs/heads/master') && (steps.changes.outputs.root == 'true')}} | |
name: Build | |
run: poetry build | |
- if: ${{ (github.ref == 'refs/heads/master') && (steps.changes.outputs.root == 'true')}} | |
name: Publish release distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |