-
Notifications
You must be signed in to change notification settings - Fork 22
74 lines (61 loc) · 1.54 KB
/
test.yml
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
65
66
67
68
69
70
71
72
73
74
name: test
on:
pull_request:
paths:
- ".github/**"
- "ragna/**"
- "tests/**"
- "environment-dev.yml"
- "pyproject.toml"
jobs:
importable:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/setup-env
with:
optional-dependencies: "false"
- name: Check if all public packages are importable
run: python tests/test_importable.py
pytest:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
python-version: ["3.9"]
include:
- os: ubuntu-latest
python-version: "3.10"
- os: ubuntu-latest
python-version: "3.11"
fail-fast: false
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/setup-env
with:
python-version: ${{ matrix.python-version }}
- name: Run unit tests
id: tests
run: pytest --junit-xml=test-results.xml --durations=25
- name: Surface failing tests
if: steps.tests.outcome != 'success'
uses: pmeier/pytest-results-action@v0.3.0
with:
path: test-results.xml