-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (48 loc) · 1.57 KB
/
ci-tests.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
# This workflow will install Python dependencies, run tests with a variety of Python versions, on Windows and Linux
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Unit tests
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
strategy:
# We use `fail-fast: false` for teaching purposess. This ensure that all combinations of the matrix
# will run even if one or more fail.
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Yes we have to explictly install pytest. In a "real" example this could be included in a
# requirement.txt or environment.yml to setup your environment
- name: Install pymecht
run: |
pip install .
# Install pytest
- name: Install pytest
run: |
pip install pytest
# Now run the tests
- name: Run pytest
run: |
python -m pytest
# - name: Test MatModel with doctest
# run: |
# python pymecht/MatModel.py
# - name: Test RandomParameters with doctest
# run: |
# python pymecht/RandomParameters.py
# - name: Test SampleExperiment with doctest
# run: |
# python pymecht/SampleExperiment.py