-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (42 loc) · 1.64 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
name: lint-test-cover-docs
on:
push
jobs:
lint_test_cover_docs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
installation: ['libsodium', 'pure-python']
name: "Python ${{ matrix.python-version }} for ${{ matrix.os }} (${{ matrix.installation }})"
steps:
- uses: actions/checkout@v3
- name: Install Python.
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install module and dependencies for linting/testing.
run: |
pip install -U .[lint,test]
- name: Keep only pure-Python dependencies when testing pure-Python installations.
run: |
pip uninstall rbcl -y
if: matrix.installation == 'pure-python'
- name: Lint and test module.
run: |
python -m pylint oprf # Check against linting rules.
python -m pytest # Run tests.
- name: Publish coverage results.
run: |
pip install -U pylint .[coveralls]
python -m coveralls --service=github # Submit to coveralls.
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' && matrix.installation == 'libsodium'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
- name: Test auto-generation of documentation.
run: |
pip install -U .[docs]
cd docs && sphinx-apidoc -f -E --templatedir=_templates -o _source .. && make html && cd ..