-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (52 loc) · 1.41 KB
/
tests.yaml
File metadata and controls
61 lines (52 loc) · 1.41 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
# ===============================================================
# Tests - Run the test suite
# ===============================================================
name: Tests
on:
workflow_call:
push:
branches: ["main"]
paths:
- "cpex/**"
- "tests/**"
- "pyproject.toml"
- ".github/workflows/tests.yaml"
pull_request:
types: [opened, synchronize, ready_for_review]
branches: ["main"]
paths:
- "cpex/**"
- "tests/**"
- "pyproject.toml"
- ".github/workflows/tests.yaml"
workflow_dispatch:
permissions:
contents: read
jobs:
test:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
os: [ubuntu-latest]
name: "Python ${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: Checkout source
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install -e ".[dev,all]"
- name: Run tests
run: |
PYTHONPATH=cpex pytest -n auto tests