-
-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (38 loc) · 1.21 KB
/
Copy pathlint.yml
File metadata and controls
45 lines (38 loc) · 1.21 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
name: Lint & Test
on:
push:
pull_request:
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Markdownlint
uses: DavidAnson/markdownlint-cli2-action@v20
with:
globs: "**/*.md !volumes/** !book/** !site/** !.github/ISSUE_TEMPLATE/** !.github/PULL_REQUEST_TEMPLATE.md"
# Markdown lint
- name: markdownlint
uses: DavidAnson/markdownlint-cli2-action@v17
with:
globs: "**/*.md !volumes/** !book/** !site/** !.github/ISSUE_TEMPLATE/** !.github/PULL_REQUEST_TEMPLATE.md"
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# Use the stable major tag to avoid pinning a non-existent version
- name: Typos (spell check)
# Typos (spell-check)
uses: crate-ci/typos@v1
# Run pytest only if tests exist
- name: Setup Python
if: ${{ hashFiles('tests/**/*.py') != '' }}
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Run tests (if any)
if: ${{ hashFiles('tests/**/*.py') != '' }}
run: |
python -m pip install --upgrade pip
pip install pytest
pytest -q