-
Notifications
You must be signed in to change notification settings - Fork 152
58 lines (55 loc) · 1.79 KB
/
test-package-matrix.yml
File metadata and controls
58 lines (55 loc) · 1.79 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
50
51
52
53
54
55
56
57
58
name: Test Package Matrix
description: Reusable workflow that tests a package across multiple operating systems and Python versions
on:
workflow_call:
inputs:
package-under-test:
description: 'Name of the package being tested'
required: true
type: string
source-dir:
description: 'Source directory containing the package'
required: true
type: string
packages:
description: 'Space-separated list of packages to install (in dependency order)'
required: true
type: string
lfs:
description: 'Whether this package test requires LFS'
required: false
type: boolean
default: false
test-target:
description: 'Makefile target to run tests'
required: false
type: string
default: 'test'
excludes:
description: 'JSON array of matrix combinations to exclude'
required: false
type: string
default: '[]'
permissions:
contents: read
jobs:
test:
name: Test ${{ inputs.package-under-test }} on ${{ matrix.os }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
exclude: ${{ fromJSON(inputs.excludes) }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-package
with:
package-under-test: ${{ inputs.package-under-test }}
source-dir: ${{ inputs.source-dir }}
packages: ${{ inputs.packages }}
lfs: ${{ inputs.lfs }}
test-target: ${{ inputs.test-target }}
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}