-
Notifications
You must be signed in to change notification settings - Fork 11
67 lines (55 loc) · 1.61 KB
/
check.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
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Run linting and sanity checks
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y openmpi-bin
sudo apt install -y libhdf5-dev
sudo apt install -y libopenmpi-dev
- name: Install JUNE
run: |
python -m pip install --upgrade pip
python setup.py install
- name: Lint with black and flake8
run: |
pip install flake8
pip install black
black --check june
black --check test_june
# stop the build if there are Python syntax errors or undefined names
# flake8 . --count --show-source --statistics
# flake8 .
flake8 june
flake8 test_june
- name: Get JUNE data
run: bash scripts/get_june_data.sh
- name: Test with pytest
run: |
pytest test_june --cov=june --cov-report xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{secrets.CODECOV_TOKEN}}
verbose: true
- name: Test all cells in ipynb for errors
run: |
pip install jupyter
jupyter nbconvert --NotebookClient.kernel_name=python3 --to notebook --inplace --execute Notebooks/quickstart.ipynb