forked from pyvista/pyvista
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (49 loc) · 1.63 KB
/
style_docstr.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
# check spelling, codestyle
name: Style and Docstring Check
on: [pull_request, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
stylecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files
docstringcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'
cache-dependency-path: requirements_test.txt
- uses: actions/cache@v3
with:
path: ~/.local/share/pyvista/examples
key: Examples-Data-${{ hashFiles('*') }}
restore-keys: |
Examples-Data-
- name: Install pyvista and doctest requirements
run: pip install . -r requirements_test.txt
- name: Setup headless display
uses: pyvista/setup-headless-display-action@v1
- name: Software Report
run: |
python -c "import pyvista; print(pyvista.Report()); from pyvista import examples; print('Examples path:', examples.USER_DATA_PATH)"
which python
pip list
- name: Test Package Docstrings
run: pytest -v --doctest-modules pyvista
- name: Test Package Docstrings with Local Namespace
run: make doctest-modules-local-namespace