-
Notifications
You must be signed in to change notification settings - Fork 34
94 lines (88 loc) · 2.21 KB
/
tests.yml
File metadata and controls
94 lines (88 loc) · 2.21 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
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
name: Tests
on:
push:
branches:
- main
tags:
- "*"
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
x64: ["0"]
include:
- python-version: "3.13"
x64: "1"
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Run tests
run: |
uv run --extra test --python ${{ matrix.python-version }} pytest -n auto tests
env:
JAX_ENABLE_X64: ${{ matrix.x64 }}
comparison:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Run tests
run: |
uv run --extra test --extra comparison --python 3.12 pytest -n auto tests
env:
JAX_ENABLE_X64: "1"
doctest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Run tests
run: |
uv run --extra test --extra doctest --python 3.12 pytest --doctest-modules -v src/tinygp
env:
JAX_ENABLE_X64: "1"
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Build the distribution
run: uv build
- name: Check the distribution
run: uv run --with twine python -m twine check --strict dist/*
- uses: actions/upload-artifact@v7
with:
path: dist/*
publish:
environment:
name: pypi
url: https://pypi.org/p/tinygp
permissions:
id-token: write
needs: [tests, comparison, doctest, build]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v8
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.13.0