-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (55 loc) · 1.79 KB
/
Copy pathtest.yml
File metadata and controls
63 lines (55 loc) · 1.79 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
name: "Run Tests"
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
enableCache:
description: "Enable cache of installed dependencies"
type: boolean
default: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
# Keep running even when one fails.
fail-fast: false
matrix:
# See: https://devguide.python.org/versions/
# See: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
python-version:
- "3.10"
- "3.13"
# TODO: Figure out pydantic bug with created/modified fields.
# - "3.14"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# For v3.14
allow-prereleases: true
- uses: astral-sh/setup-uv@v5
with:
# Enable cache, except when manually triggered and explicitly disabled.
enable-cache: ${{ github.event_name != 'workflow_dispatch' || inputs.enableCache }}
version: "latest"
# As a library, we're not version-controlling uv.lock, so need pyproject.toml check.
# See: https://github.com/astral-sh/setup-uv/issues/261#issue-2818259989
cache-dependency-glob: |
**/*(requirements|constraints)*.(txt|in)
**/pyproject.toml
**/uv.lock
cache-suffix: python-${{ matrix.python-version }}
- name: Create virtual environment
run: make venv
- name: Install dependencies
run: make install-dev
- name: Test with pytest
run: make test
- name: Test notebooks
run: make test-nb