build(deps): bump codecov/codecov-action from 4 to 5 #820
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: pyg4ometry | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- "releases/**" | |
pull_request: | |
release: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
name: Test with Python | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install conda on Windows | |
if: runner.os == 'Windows' | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Install non-pip (apt) dependencies on Ubuntu | |
if: runner.os == 'Linux' | |
run: sudo .github/bin/install-deps-ubuntu.sh | |
- name: Install non-pip (brew) dependencies on MacOS | |
if: runner.os == 'macOS' | |
run: .github/bin/install-deps-macos.sh | |
- name: Install non-pip (conda) dependencies on Windows | |
if: runner.os == 'Windows' | |
run: .github/bin/install-deps-windows.cmd | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get number of CPU cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
id: cpu-cores | |
- name: Get dependencies and install pyg4ometry | |
run: | | |
python -m pip install --upgrade pip wheel setuptools | |
python -m pip install --upgrade --verbose .[test] | |
- name: Run unit tests | |
if: runner.os != 'Windows' | |
run: | | |
python -m pytest | |
test-in-container: | |
name: Test in Docker container | |
runs-on: ubuntu-latest | |
container: docker://g4edge/ubuntu:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get number of CPU cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
id: cpu-cores | |
- name: Get dependencies and install pyg4ometry | |
run: | | |
python -m pip install --upgrade pip wheel setuptools | |
MAKEFLAGS=-j${{ steps.cpu-cores.outputs.count }} python -m pip install --upgrade --verbose .[test] | |
- name: Run unit tests | |
run: | | |
python -m pytest --runxfail | |
test-coverage: | |
name: Calculate and upload test coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Install non-pip dependencies on Ubuntu | |
run: | | |
sudo .github/bin/install-deps-ubuntu.sh | |
.github/bin/setenv-ubuntu.sh | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Get number of CPU cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
id: cpu-cores | |
- name: Generate Report | |
run: | | |
python -m pip install --upgrade pip wheel setuptools | |
MAKEFLAGS=-j${{ steps.cpu-cores.outputs.count }} python -m pip install --upgrade --verbose .[test] | |
python -m pytest --runxfail --cov=pyg4ometry --cov-report=xml | |
- name: Upload Coverage to codecov.io | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |