Repository navigation
92 lines (74 loc) · 2.31 KB
/
Copy pathdevelop.yaml
File metadata and controls
92 lines (74 loc) · 2.31 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
name: python template develop workflow
on:
push:
branches-ignore:
- master
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
- name: "2. Set up Python ${{ matrix.python-version}}"
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version}}
- name: "3. Update pip"
run: |
python -m pip install --upgrade pip
- name: "4. Attach cache for pip"
uses: actions/cache@v1
id: cache
with:
path: ~/.cache/pip
key: tests-${{ runner.os }}-pip-${{ hashFiles('requirements/main.txt', 'requirements/dev.txt') }}
restore-keys: |
tests-${{ runner.os }}-pip-
- name: "5. Install main and dev dependencies"
run: |
pip install -q .
pip install -q -r requirements/dev.txt
- name: "5. Run tests"
run: |
python -m unittest
- name: "6. Run linter"
run: |
flake8 --config=setup.cfg python_template
docs:
runs-on: ubuntu-latest
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
- name: "2. Set up Python 3.6"
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: "3. Update pip and install pandoc"
run: |
sudo apt-get install -y pandoc
python -m pip install --upgrade pip
- name: "4. Attach cache for pip"
uses: actions/cache@v1
id: cache
with:
path: ~/.cache/pip
key: release-${{ runner.os }}-pip-${{ hashFiles('requirements/main.txt', 'requirements/release.txt') }}
restore-keys: |
release-${{ runner.os }}-pip-
- name: "5. Install main and release dependencies"
run: |
pip install -q .
pip install -q -r requirements/release.txt
pip install -q sphinx_rtd_theme
- name: "6. Generate API documentation"
run: |
make --directory ./docs generate-api
- name: "6. Generate README"
run: |
make --directory ./docs generate-readme
- name: "8. Build documentation"
run: |
make --directory ./docs html