Skip to content

chore: security workflows consolidation and github actions upgrade #5198

chore: security workflows consolidation and github actions upgrade

chore: security workflows consolidation and github actions upgrade #5198

Workflow file for this run

name: PR Test
on:
pull_request:
branches:
- develop
- release**
merge_group:
branches:
- develop
- release**
push:
branches:
- develop
- release**
permissions:
# The id-token permission is required by Codecov to use OIDC
id-token: write
# This is what will cancel the workflow concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
pr_test:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-24.04", "windows-2022", "macos-15"]
python-version: ["3.10", "3.14"]
name: pr test (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Installing Rust toolchain
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561
with:
toolchain: stable
- name: Install uv and set the python version
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
enable-cache: false
python-version: ${{ matrix.python-version }}
version: "0.8.15"
- name: Installing dependencies
run: uv sync --locked --all-extras --dev
- name: Tests
run: uv run pytest --cov --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
flags: ${{ matrix.os }}_Python-${{ matrix.python-version }}
use_oidc: true