Skip to content

Swap out references to pre-commit with prek (#645) #2795

Swap out references to pre-commit with prek (#645)

Swap out references to pre-commit with prek (#645) #2795

Workflow file for this run

name: Run template tests
on:
push:
branches:
- main
- "renovate/**"
pull_request:
schedule:
# Run at 11 am on the 2nd January each year to make sure
# dates in package regression test data get updated
# See https://github.com/UCL-ARC/python-tooling/pull/597
- cron: "0 11 2 1 *"
jobs:
test-template:
name: test ${{ matrix.os }} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
python-version:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- name: Checkout source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Cache tox
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .tox
key: test-${{ hashFiles('pyproject.toml') }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: python -m pip install tox tox-gh
- name: Run tests
run: tox run
env:
TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}