Skip to content

Bump pre-commit from 4.5.1 to 4.6.0 in the python group across 1 directory #1290

Bump pre-commit from 4.5.1 to 4.6.0 in the python group across 1 directory

Bump pre-commit from 4.5.1 to 4.6.0 in the python group across 1 directory #1290

Workflow file for this run

name: CI - Tests
on:
pull_request:
push:
branches:
- 'master'
- 'push-action/**' # Allow pushing to protected branches (using CasperWA/push-protected)
jobs:
basic-tests:
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.10.0
with:
## General settings:
install_extras: "[dev]"
## pre-commit
run_pre-commit: false
## pylint & safety
run_pylint: false
run_safety: false
## Build package
run_build_package: true
python_version_package: "3.10"
build_libs: flit
build_cmd: flit build
## Build documentation
run_build_docs: true
python_version_docs: "3.10"
warnings_as_errors: true
use_mkdocs: true
# mkdocs-specific settings
update_python_api_ref: true
update_docs_landing_page: true
package_dirs: oteapi_dlite
full_docs_dirs: |
models
strategies
landing_page_replacements: |
(LICENSE),(LICENSE.md)
https://EMMC-ASBL.github.io/oteapi-dlite/latest/,
all_strategies),all_strategies.md)
pip-audit:
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install -U pip
pip install -U setuptools wheel
pip install -U -r .github/utils/requirements_audit.txt
# TEMPORARY: Use pip<25.3 due to a compatibility issue with pip-tools and pip 25.3+
pip install "pip<25.3"
- name: Prepare for pip-audit
run: pip-compile --output-file="${{ runner.temp }}/requirements.txt" --all-extras --allow-unsafe --color --verbose "${{ github.workspace }}/pyproject.toml"
- name: Run pip-audit
uses: pypa/gh-action-pip-audit@v1.1.0
with:
inputs: '${{ runner.temp }}/requirements.txt'
# CVE-2025-69872: DiskCache 5.6.3
# DiskCache (python-diskcache) through 5.6.3 uses Python pickle for serialization by default.
# An attacker with write access to the cache directory can achieve arbitrary code execution
# when a victim application reads from the cache.
ignore-vulns: |
CVE-2025-69872
pytest:
name: pytest (${{ matrix.os[1] }}-py${{ matrix.python-version }})
runs-on: ${{ matrix.os[0] }}
strategy:
fail-fast: false
matrix:
os:
- ["ubuntu-latest", "Linux"]
- ["windows-latest", "Windows"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install Linux system dependencies
if: matrix.os[1] == 'Linux'
run: sudo apt -qqy update && sudo apt install -y ghostscript
- name: Install Windows system dependencies
if: matrix.os[1] == 'Windows'
run: |
$url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9550/gs9550w64.exe"
$outpath = "${{ github.workspace }}\ghostscript.exe"
Invoke-WebRequest -Uri $url -OutFile $outpath
$args = @("/S")
Start-Process -Filepath $outpath -ArgumentList $args
shell: powershell
- name: Install dependencies
run: |
python -m pip install -U pip
pip install -U setuptools wheel
pip install -e .[testing]
- name: List installed packages
run: pip freeze
- name: Test with pytest
run: |
pytest -vv --cov-report=xml --doctest-modules --cov=oteapi_dlite
pytest -vv --cov-report=xml:strategies.xml --doctest-modules --cov=oteapi_dlite/strategies
- name: Upload coverage to Codecov
if: github.repository == 'EMMC-ASBL/oteapi-dlite'
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: ${{ matrix.os[1] }}
env_vars: PYTHON,OS
env:
OS: ${{ matrix.os[1] }}
PYTHON: ${{ matrix.python-version }}
- name: Upload strategies coverage to Codecov
if: github.repository == 'EMMC-ASBL/oteapi-dlite'
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: strategies.xml
flags: ${{ matrix.os[1] }}-strategies
env_vars: PYTHON,OS
env:
OS: ${{ matrix.os[1] }}
PYTHON: ${{ matrix.python-version }}