forked from Quansight/ragna
-
Notifications
You must be signed in to change notification settings - Fork 0
143 lines (122 loc) · 3.08 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: test
on:
pull_request:
paths:
- ".github/**"
- "ragna/**"
- "tests/**"
- "environment-dev.yml"
- "pyproject.toml"
push:
branches:
- release/*
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 \
--ignore tests/deploy/ui \
--junit-xml=test-results.xml \
--durations=25
- name: Surface failing tests
if: steps.tests.outcome != 'success'
uses: pmeier/[email protected]
with:
path: test-results.xml
pytest-ui:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
browser:
- chromium
- firefox
python-version:
- "3.9"
- "3.10"
- "3.11"
exclude:
- python-version: "3.10"
os: windows-latest
- python-version: "3.11"
os: windows-latest
- python-version: "3.10"
os: macos-latest
- python-version: "3.11"
os: macos-latest
include:
- browser: webkit
os: macos-latest
python-version: "3.9"
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 tests/deploy/ui \
--browser ${{ matrix.browser }} \
--video=retain-on-failure
- name: Upload playwright video
if: failure()
uses: actions/upload-artifact@v4
with:
name:
playwright-${{ matrix.os }}-${{ matrix.python-version}}-${{ github.run_id }}
path: test-results