build(deps): bump codecov/codecov-action from 3 to 4 #90
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: | |
pull_request: | |
merge_group: | |
permissions: | |
contents: read | |
env: | |
MINIMUM_PYTHON_VERSION: "3.10" | |
jobs: | |
lint: | |
name: ${{ matrix.task.name }} (${{ matrix.os }}) | |
strategy: | |
max-parallel: 4 | |
fail-fast: false | |
matrix: | |
# Only run checks for ubuntu | |
os: [ubuntu] | |
task: | |
- name: Lint code | |
run: make lint | |
- name: Lint dependencies | |
run: make lint-dependencies | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
#---------------------------------------------- | |
# check-out repo | |
#---------------------------------------------- | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
#---------------------------------------------- | |
# ----- install & configure python & rye ----- | |
#---------------------------------------------- | |
- name: Set up the environment | |
uses: ./.github/actions/setup-python-env | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
#---------------------------------------------- | |
# Run matrix task | |
#---------------------------------------------- | |
- name: ${{ matrix.task.name }} | |
run: ${{ matrix.task.run }} | |
check-fmt: | |
name: ${{ matrix.task.name }} (${{ matrix.os }}) | |
strategy: | |
max-parallel: 4 | |
fail-fast: false | |
matrix: | |
# Only run checks for ubuntu | |
os: [ubuntu] | |
task: | |
- name: Check formatting | |
run: make check-fmt | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
#---------------------------------------------- | |
# check-out repo | |
#---------------------------------------------- | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
#---------------------------------------------- | |
# ----- install & configure python & rye ----- | |
#---------------------------------------------- | |
- name: Set up the environment | |
uses: ./.github/actions/setup-python-env | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
#---------------------------------------------- | |
# Run matrix task | |
#---------------------------------------------- | |
- name: ${{ matrix.task.name }} | |
run: ${{ matrix.task.run }} | |
type-check: | |
name: ${{ matrix.task.name }} (${{ matrix.os }}) | |
strategy: | |
max-parallel: 4 | |
fail-fast: false | |
matrix: | |
# Only run checks for ubuntu | |
os: [ubuntu] | |
task: | |
- name: Type check | |
run: make type-check | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
#---------------------------------------------- | |
# check-out repo | |
#---------------------------------------------- | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
#---------------------------------------------- | |
# ----- install & configure python & rye ----- | |
#---------------------------------------------- | |
- name: Set up the environment | |
uses: ./.github/actions/setup-python-env | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
#---------------------------------------------- | |
# Run matrix task | |
#---------------------------------------------- | |
- name: ${{ matrix.task.name }} | |
run: ${{ matrix.task.run }} | |
coverage: | |
name: Test coverage py-${{ matrix.python-version }} on ${{ matrix.os }} | |
strategy: | |
max-parallel: 4 | |
fail-fast: false | |
matrix: | |
# ignore windows for now | |
os: [ubuntu] # , macos, windows-latest] | |
python-version: | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
continue-on-error: >- | |
${{ contains(matrix.python-version, 'dev') && true || false }} | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
#---------------------------------------------- | |
# check-out repo | |
#---------------------------------------------- | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
#---------------------------------------------- | |
# ----- install & configure python & rye ----- | |
#---------------------------------------------- | |
- name: Set up the environment | |
uses: ./.github/actions/setup-python-env | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
#---------------------------------------------- | |
# Run tests and upload coverage | |
#---------------------------------------------- | |
- name: Run tests for coverage | |
run: make cov_report=xml test-w-coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# directory: ./coverage/reports/ | |
# env_vars: OS,PYTHON | |
fail_ci_if_error: false | |
# files: ./coverage1.xml,./coverage2.xml | |
# flags: unittests | |
# name: codecov-umbrella | |
verbose: true | |
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks | |
check: | |
if: always() | |
needs: [lint, coverage, type-check, check-fmt] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} | |
allowed-failures: type-check, lint | |