Feat/change optional fields parameter #19
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: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
py: | |
- "3.11" | |
- "3.10" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup python for test ${{ matrix.py }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.py }} | |
- name: Install tox | |
run: python -m pip install tox-gh>=1.2 | |
- name: Setup test suite | |
run: tox -vv --notest | |
- name: Run test suite | |
run: tox --skip-pkg-install | |
lint: | |
name: lint (3.12) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup python for test Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install tox | |
run: python -m pip install tox-gh>=1.2 | |
- name: Setup test suite | |
run: tox -vv --notest | |
- name: Run test suite | |
run: tox --skip-pkg-install -e lint | |
coverage: | |
name: coverage (3.12) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup python for test Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install tox | |
run: python -m pip install tox-gh>=1.2 | |
- name: Setup test suite | |
run: tox -vv --notest | |
- name: Run test suite | |
run: tox --skip-pkg-install -e coverage | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: coverage_report | |
path: ./reports | |
coverage-report: | |
name: coverage report | |
needs: | |
- coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: coverage_report | |
path: reports | |
- name: Produce the coverage report | |
uses: insightsengineering/coverage-action@v2 | |
with: | |
# Path to the Cobertura XML report. | |
path: ./reports/coverage.xml | |
# Minimum total coverage, if you want to the | |
# workflow to enforce it as a standard. | |
# This has no effect if the `fail` arg is set to `false`. | |
threshold: 99 # Temporary set to 50%. Should be 95%. | |
# Fail the workflow if the minimum code coverage | |
# reuqirements are not satisfied. | |
fail: false | |
# Publish the rendered output as a PR comment | |
publish: true | |
# Create a coverage diff report. | |
diff: true | |
# Branch to diff against. | |
# Compare the current coverage to the coverage | |
# determined on this branch. | |
diff-branch: main | |
# This is where the coverage reports for the | |
# `diff-branch` are stored. | |
# Branch is created if it doesn't already exist'. | |
diff-storage: _xml_coverage_reports | |
# Fail the action if any new uncovered statements are introduced compared to the diff-branch. | |
coverage-reduction-failure: false | |
togglable-report: true |