Refactoring for personio-py 1.0 #171
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: coverage | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'docs/**' | |
- '*.md' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- 'docs/**' | |
- '*.md' | |
jobs: | |
coverage: | |
name: Coverage Reports on codecov.io | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: poetry install --only=main,test --no-interaction | |
- name: Generate coverage report | |
run: poetry run pytest --cov=src --cov-report=xml --cov-report=term | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.xml | |
fail_ci_if_error: true | |
verbose: true |