-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.42 KB
/
test.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
name: Test
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
# Check out current repo
- name: Checkout current repository
uses: actions/checkout@v3
# Prepare a minimal environment
- name: Setup Miniconda
uses: conda-incubator/[email protected]
with:
python-version: 3.9
activate-environment: test
channel-priority: true
environment-file: devtools/conda-envs/test_env.yml
auto-activate-base: false
# Install pmx from the (py3 compatible) develop branch
- name: Install pmx
shell: bash -l {0}
run: |
pip install git+https://github.com/deGrootLab/pmx.git@develop
# Get more information about environment
- name: Environment information
shell: bash -l {0}
run: |
conda info
conda list
# Test that simulations run without error
- name: Run simulations
shell: bash -l {0}
run: |
bash tests/test_run_simulations.sh
# Run Python tests
- name: Run Python tests
shell: bash -l {0}
run: |
python -m pytest tests/