-
Notifications
You must be signed in to change notification settings - Fork 3
124 lines (117 loc) · 3.38 KB
/
Copy pathci.yml
File metadata and controls
124 lines (117 loc) · 3.38 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Continuous integration
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
code_quality:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip
echo "::set-output name=dir::$(pip cache dir)"
- name: Set up pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install .[quality]
- name: Check black compliance
run: |
black --check --line-length 90 --target-version py36 podium tests
- name: Check isort compliance
run: |
isort --check-only podium tests
- name: Check docformatter compliance
run: |
docformatter podium tests --check --recursive \
--wrap-descriptions 80 --wrap-summaries 80 \
--pre-summary-newline --make-summary-multi-line
- name: Check flake8 compliance
run: |
flake8 podium tests
build_and_test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] # + [macos-latest, windows-latest] on launch
python-version: [3.6]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip
echo "::set-output name=dir::$(pip cache dir)"
- name: Set up pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install .[tests]
python -m spacy download en_core_web_sm
- name: Run tests
run: |
pytest -sv tests
build_docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip
echo "::set-output name=dir::$(pip cache dir)"
- name: Set up pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install .[docs]
- name: Test and build docs
run: |
cd docs
make doctest
make linkcheck --jobs 2 SPHINXOPTS="-W"
make html SPHINXOPTS="-W"
- name: Upload docs artifact
uses: actions/upload-artifact@v2
with:
name: docs_html
path: docs/build/html