-
Notifications
You must be signed in to change notification settings - Fork 121
62 lines (48 loc) · 1.41 KB
/
Python.yaml
File metadata and controls
62 lines (48 loc) · 1.41 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
name: Python
on:
push:
branches: [master, develop]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pytest:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (Python ${{ matrix.python-version }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.13"]
env:
CMDSTAN_VERSION: "2.36.0"
defaults:
run:
working-directory: ./Python
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Set up Python
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --all-groups
- name: Cache CmdStan
id: cmdstan-cache
uses: actions/cache@v4
with:
path: ~/.cmdstan
key: cmdstan-${{ runner.os }}-${{ env.CMDSTAN_VERSION }}
- name: Install CmdStan
if: steps.cmdstan-cache.outputs.cache-hit != 'true'
shell: bash
run: |
uv run python -c "import cmdstanpy; cmdstanpy.install_cmdstan(version='${CMDSTAN_VERSION}', cores=2)"
- name: Lint
run: uv run ruff check hbayesdm
continue-on-error: true
- name: Run user-facing tests
run: uv run pytest tests/test_user_facing.py -v --reruns 2