-
Notifications
You must be signed in to change notification settings - Fork 14
43 lines (40 loc) · 1.04 KB
/
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
# main test workflow; ported from .travis.yaml
name: tests
on:
push:
branches: [ '*', $default-branch ]
pull_request:
branches: [ $default-branch ]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
cache: 'pip'
- name: Install dependencies
run: |
sudo apt update
# Install HDF5 to avoid failure of building h5py
sudo apt-get install libhdf5-dev
sudo apt install -y libgsl-dev libboost-test-dev
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install build pytest
- name: Build
run: |
git submodule update --init --recursive
python3 -m build
- name: Install
run:
python3 -m pip install --user dist/fake_spectra*.whl
- name: Python unit tests
run: pytest
- name: Boost unit tests
run: make test