-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.3 KB
/
python-test.yml
File metadata and controls
49 lines (42 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Python Tests
on:
workflow_call:
inputs:
action-runs-on:
description: 'The type of runner to run the job on'
required: false
default: 'ubuntu-latest' # other common option: "self-hosted"
type: string
python-versions:
description: "Python versions to test against"
required: false
type: string
default: '["3.10","3.11","3.12","3.13"]'
jobs:
tests:
runs-on: ${{ inputs.action-runs-on }}
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJSON(inputs.python-versions) }}
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.1
with:
fetch-depth: 1
- name: Setup | Force correct release branch on workflow SHA
run: |
git checkout -B ${{ github.ref_name }}
- name: Checkout central workflows
uses: actions/checkout@v6.0.1
with:
repository: FacsimiLab/central-workflows
path: .central-workflows
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Run tests
run: uv run pytest -s -v