Skip to content

Bump codecov/codecov-action from 4.6.0 to 5.0.2 #546

Bump codecov/codecov-action from 4.6.0 to 5.0.2

Bump codecov/codecov-action from 4.6.0 to 5.0.2 #546

Workflow file for this run

# adapted from xarray's ci
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
detect-skip-ci-trigger:
name: "Detect CI Trigger: [skip-ci]"
if: github.event_name == 'push' || github.event_name == 'pull_request'
runs-on: ubuntu-latest
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: xarray-contrib/ci-trigger@v1
id: detect-trigger
with:
keyword: "[skip-ci]"
ci:
name: ${{ matrix.os }} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
needs: detect-skip-ci-trigger
defaults:
run:
shell: bash -l {0}
env:
FORCE_COLOR: 3
if: |
always()
&& github.repository == 'xarray-contrib/pint-xarray'
&& (
github.event_name == 'workflow_dispatch'
|| needs.detect-skip-ci-trigger.outputs.triggered == 'false'
)
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- name: checkout the repository
uses: actions/checkout@v4
with:
# need to fetch all tags to get a correct version
fetch-depth: 0 # fetch all branches and tags
- name: cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-py${{ matrix.python-version }}
restore-keys: |
pip-
- name: setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: upgrade pip
run: python -m pip install --upgrade pip setuptools wheel
- name: install dependencies
run: |
python -m pip install -r ci/requirements.txt
- name: install pint-xarray
run: python -m pip install --no-deps .
- name: show versions
run: python -m pip list
- name: import pint-xarray
run: |
python -c 'import pint_xarray'
- name: run tests
if: success()
id: status
run: |
python -m pytest --cov=pint_xarray --cov-report=xml
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v5.0.2
with:
file: ./coverage.xml
flags: unittests
env_vars: RUNNER_OS,PYTHON_VERSION
name: codecov-umbrella
fail_ci_if_error: false