forked from CryPTSys/PharmaPy
-
Notifications
You must be signed in to change notification settings - Fork 3
109 lines (90 loc) · 2.66 KB
/
Copy pathci.yml
File metadata and controls
109 lines (90 loc) · 2.66 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- "**"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
core-tests:
name: Core tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install core dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[test]"
- name: Collect tests
run: python -m pytest --collect-only
- name: Run assimulo-free tests
run: python -m pytest tests/ -m "not assimulo"
pixi-lock:
name: Locked pixi install (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Reject non-local PyPI lock entries
shell: bash
run: |
if grep -nE -- '- pypi:' pixi.lock | grep -vE -- '- pypi: \./$'; then
echo "::error file=pixi.lock::Only the local editable project may be installed from PyPI in pixi environments." >&2
exit 1
fi
- name: Set up locked pixi environments
uses: prefix-dev/setup-pixi@v0.10.0
with:
pixi-version: v0.74.0
manifest-path: pyproject.toml
environments: >-
default
assimulo
locked: true
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
- name: Verify documented locked installation
run: pixi install --all --locked
- name: Verify core and solver imports
run: |
pixi run python -c "import PharmaPy"
pixi run -e assimulo python -c "import PharmaPy, assimulo"
integration-assimulo:
name: Assimulo integration tests
runs-on: ubuntu-latest
timeout-minutes: 30
continue-on-error: true
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up locked Assimulo environment
uses: prefix-dev/setup-pixi@v0.10.0
with:
pixi-version: v0.74.0
manifest-path: pyproject.toml
environments: assimulo
locked: true
cache: true
cache-write: false
- name: Run Assimulo-marked tests
run: pixi run -e assimulo test-assimulo