Skip to content

CI

CI #898

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
merge_group:
push:
branches:
- master
- main
- develop
jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v6
with:
python-version: 3.12
- uses: pre-commit/action@v3.0.0
with:
extra_args: --hook-stage manual --all-files
checks:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
needs: [pre-commit]
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.13", "3.14", "3.14t"]
runs-on: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm]
exclude:
- python-version: "3.9"
runs-on: windows-11-arm
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: python -m pip install . --group test
- name: Test package
if: ${{ !endsWith(matrix.python-version , 't') }}
run: python -m pytest
- name: Test package (parallel)
if: endsWith(matrix.python-version , 't')
run: python -m pytest --parallel-threads=16 --iterations=10
checkroot:
name: Check ROOT bindings
needs: [pre-commit]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.12
miniforge-version: latest
- name: Install ROOT
shell: bash -l {0}
run: |
mamba install root
- name: Install package
shell: bash -l {0}
run: python -m pip install . --group test
- name: Test package
shell: bash -l {0}
run: pytest
test-cvmfs:
name: Test latest corrections on CVMFS
needs: [checks]
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- uses: cvmfs-contrib/github-action-cvmfs@v4
with:
cvmfs_repositories: "cms-griddata.cern.ch"
- uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install package
run: python -m pip install . --group test
- name: Test package
run: |
mkdir -p .benchmarks
python -m pytest -m cvmfs --benchmark-json=.benchmarks/cvmfs-benchmark.json --benchmark-max-time 0.1
- name: Upload benchmark artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: cvmfs-benchmark-json
path: .benchmarks/cvmfs-benchmark.json
if-no-files-found: ignore
- name: Build benchmark PR summary
if: always() && github.event_name == 'pull_request'
run: python .github/scripts/summarize_benchmark.py
- name: Comment benchmark summary on PR
if: always() && github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: cvmfs-benchmark
path: .benchmarks/pr-comment.md
pass:
name: All tests passed
needs: [checks, checkroot, test-cvmfs]
runs-on: ubuntu-latest
steps:
- run: echo "All jobs passed"