-
Notifications
You must be signed in to change notification settings - Fork 16
47 lines (46 loc) · 1.3 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
44
45
46
47
name: pyuoi_tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9"]
os: [ubuntu-latest, macOS-latest]
steps:
- name: Test pyuoi
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
if [ "${{matrix.os}}" = "ubuntu-latest" ]; then
sudo apt-get update
sudo apt-get install -y openmpi-bin libopenmpi-dev gcc
python -m pip install mpi4py
fi
python -m pip install codecov pytest-cov pycasso
python -m pip install -e .
- name: Lint with flake8
run: |
python -m flake8 src/pyuoi tests examples
- name: Test with pytest
run: |
python -m pytest -sv --cov=./ tests
- name: Build docs
run: |
sphinx-build -W -b html docs/source docs/build
- name: Codecov
run: |
python -m codecov