-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.13 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
name: Python tests
on:
push:
branches: [ master ]
tags: ['*']
pull_request:
branches: [ master ]
release:
types: [ published ]
jobs:
example_test:
if: >
!contains(needs.initialise.outputs.commit_message, '[ci skip]') &&
!contains(needs.initialise.outputs.commit_message, '[skip ci]')
name: Fast tests
runs-on: ${{ matrix.platform }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
platform: [ubuntu-latest] # TODO add Windows as well
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and iontracks package
run: |
python --version
pip --version
CYTHONIZE=1 pip install --editable .
- name: Run example script
run: python example_single_track.py
working-directory: hadrons
- name: Install test dependencies
run: pip install pytest pytest-xdist
- name: Run unit and integration tests
run: python -m pytest -n 2