-
-
Notifications
You must be signed in to change notification settings - Fork 15
57 lines (47 loc) · 1.5 KB
/
main.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
name: httpstan
on: [push, pull_request]
jobs:
tests:
name: httpstan tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
python-version: ["3.10", "3.11"]
include:
- os: ubuntu-24.04
python-version: "3.12"
- os: macos-12
python-version: "3.10"
- os: macos-13
python-version: "3.11"
- os: macos-13
python-version: "3.12"
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pip install "poetry~=1.7.1"
- name: Build libraries used by Stan
run: make -j2
# export test dependencies from pyproject.toml, install them
- name: Install dependencies
run: |
poetry export -f requirements.txt --without-hashes --with dev -o requirements.txt \
&& pip install -r requirements.txt
- name: Check code
run: scripts/check
- name: Build and Install wheel
run: |
poetry build -v
python -m pip install dist/*.whl
- name: Run tests
run: python -m pytest -s -v tests
- name: Test PyStan compatibility
run: |
pip install --pre pystan
python -c'import stan;assert stan.build("parameters {real y;} model {y ~ normal(0,1);}").sample()["y"] is not None'