-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.61 KB
/
lint-test-cover-docs.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
name: lint-test-cover-docs
on:
push
jobs:
lint_test_cover_docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
name: "Python ${{ matrix.python-version }}"
steps:
- uses: actions/checkout@v2
- name: Install Python.
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install pipenv
run: |
python -m pip install --upgrade pip setuptools wheel
pip install pipenv
- name: Cache pipenv
id: cache-pipenv
uses: actions/cache@v2
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
- name: Lint and test module.
run: |
pipenv install --dev
pipenv run flake8 # Check against linting rules.
pipenv run pytest --cov=sfu --cov-report term-missing # Test using pytest.
- name: Publish coverage results.
run: |
pipenv install coveralls
pipenv run coveralls --service=github # Submit to coveralls.
if: matrix.python-version == '3.8'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test auto-generation of documentation.
run: |
pip install -U -r docs/requirements.txt
# Get sfu installed outside of virtualenv so it can be used to generate docs. These run without pipenv.
pip install -e .
cd docs && sphinx-apidoc -f -E --templatedir=_templates -o _source .. && make html && cd ..