-
Notifications
You must be signed in to change notification settings - Fork 4
90 lines (76 loc) · 2.35 KB
/
pylbo.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: pylbo
on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
env:
CC: /usr/bin/gcc-10
FC: /usr/bin/gfortran-10
LEGOLASDIR: /home/runner/work/legolas/legolas
jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 black
- name: Run flake8
run: |
flake8 --count --exclude=__init__.py --extend-ignore=E203,W503 --max-line-length=88 --show-source --statistics post_processing/
flake8 --count --exclude=__init__.py --extend-ignore=E203,W503 --max-line-length=88 --show-source --statistics tests/pylbo_tests/
flake8 --count --exclude=__init__.py --extend-ignore=E203,W503 --max-line-length=88 --show-source --statistics tests/regression_tests/
- name: Run black
run: |
black --diff --check post_processing/
black --diff --check tests/regression_tests/
black --diff --check tests/pylbo_tests/
tests:
runs-on: ubuntu-latest
needs: style
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
sudo apt-get update
sudo apt-get install ffmpeg
cd post_processing
python setup.py develop
- name: Install Legolas dependencies
run: |
sudo apt-get install libblas-dev
sudo apt-get install liblapack-dev
sudo apt-get install lcov
gfortran-10 --version
cmake --version
- name: Compile Legolas
run: |
mkdir build
cd build
cmake ..
make -j 2
- name: Run Pylbo tests
run: |
mkdir -p coverage/pylbo
cd $LEGOLASDIR/tests/pylbo_tests
cp .coveragerc $LEGOLASDIR/coverage/pylbo
pytest -v --cov=pylbo
cd $LEGOLASDIR/coverage/pylbo
coverage xml
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
files: ./coverage/pylbo/coverage.xml
flags: pylbo