-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (50 loc) · 1.51 KB
/
pytest.yml
File metadata and controls
64 lines (50 loc) · 1.51 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
59
60
61
62
63
64
name: PyTest
on:
workflow_call:
inputs:
setup-path:
type: string
default: "."
test-path:
type: string
default: ""
requirements-file:
type: string
default: "test-requirements.txt"
repository:
type: string
default: ${{ github.repository }}
jobs:
pytest:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runner: ["ubuntu-latest", "windows-latest", "macos-latest"]
name: PyTest ${{ matrix.python-version }} [${{ matrix.runner }}]
steps:
- name: Checkout Repo
uses: actions/checkout@v6
with:
repository: ${{ inputs.repository }}
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade Pip
run: |
python -m pip install --upgrade pip
- name: Install Tools (Wheel, Setuptools, Pytest)
run: |
python -m pip install wheel setuptools pytest
- name: Install Testing Requirements
if: ${{ hashFiles(inputs.requirements-file) != '' }}
run: |
pip install -r ${{ inputs.requirements-file }}
- name: Build & Install Repo
run: |
python -m pip install ${{ inputs.setup-path }}
- name: Run PyTest
run: |
pytest -v ${{ inputs.test-path }} --color=yes