forked from zauberzeug/nicegui
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.47 KB
/
_test.yml
File metadata and controls
50 lines (48 loc) · 1.47 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
name: Test Suite
on:
workflow_call:
inputs:
python-versions:
description: "JSON array of Python versions to test"
required: true
type: string
scope:
description: "JSON array of scopes to run"
required: true
type: string
jobs:
test:
name: ${{ matrix.python }} / ${{ matrix.scope }}
strategy:
matrix:
python: ${{ fromJson(inputs.python-versions) }}
scope: ${{ fromJson(inputs.scope) }}
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install Python
run: uv python install ${{ matrix.python }}
- name: Install dependencies
run: uv sync
- uses: nanasess/setup-chromedriver@v2.3.0
- name: ${{ matrix.python }} / ${{ matrix.scope }}
if: matrix.scope == 'pytest'
run: uv run pytest
- uses: actions/upload-artifact@v5
if: matrix.scope == 'pytest' && failure()
with:
name: screenshots-${{ matrix.python }}
path: screenshots/*.failed.png
retention-days: 14
- name: ${{ matrix.python }} / ${{ matrix.scope }}
if: matrix.scope == 'startup'
run: ./test_startup.sh
- name: Restore dependencies for effective caching
if: matrix.scope == 'startup' && always()
run: uv sync