-
Notifications
You must be signed in to change notification settings - Fork 4
77 lines (74 loc) · 2.26 KB
/
ci_checks.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
name: ci_checks
on: [push]
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout repo and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: | # Unit tests require lisdf-models
pip install -e .[develop]
pip install lisdf_models@git+https://github.com/Learning-and-Intelligent-Systems/lisdf-models.git
- name: Pytest
run: |
# Note tests/ directory is not included in coverage
pytest -s tests/ --cov-config=.coveragerc --cov=lisdf/ --cov-fail-under=75 --cov-report=term-missing:skip-covered
static-type-checking:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: | # mypy needs lisdf-models for lisdf/parsing/parse_sdf.py
pip install -e .[develop]
pip install lisdf_models@git+https://github.com/Learning-and-Intelligent-Systems/lisdf-models.git
- name: Mypy
run: |
mypy . --config-file mypy.ini
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -e .[develop]
- name: Flake8
run: |
flake8
autoformat:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run isort to organize imports
uses: isort/isort-action@master
- name: Run black to check code formatting
uses: psf/black@stable