Skip to content

Commit 81a5975

Browse files
committed
ci: Add test workflow
1 parent 6dc8458 commit 81a5975

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

.github/workflows/test.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Run tests
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: ['3.7', '3.8', '3.9', '3.10']
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install dependencies
19+
run: |
20+
pip install -r requirements/base.txt
21+
pip install tox tox-gh-actions
22+
- name: Check markdown format
23+
run: mdformat --check docs/
24+
- name: Test with tox
25+
run: tox

requirements/base.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ sphinx_rtd_theme==1.1.1
33
myst-parser==0.18.1
44
mdit-py-plugins
55
sphinx-copybutton==0.5.1
6+
mdformat==0.7.16
7+
mdformat-myst==0.1.5
68

79
beautifulsoup4==4.11.1
810
markdownify==0.11.2

tox.ini

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
[tox]
2-
envlist = py37,py38
2+
envlist = py37,py38,py39,py10
33
skipsdist = True
44

5+
[gh-actions]
6+
python =
7+
3.7: py37
8+
3.8: py38
9+
3.9: py39
10+
3.10: py310
11+
512
[testenv]
613
setenv =
714
ENVIRONMENT = testing
@@ -12,4 +19,4 @@ allowlist_externals=bash
1219
commands =
1320
bash -c "pytest tests -n $(nproc)"
1421
mypy --install-types --non-interactive .
15-
black --check .
22+
pre-commit run --all-files

0 commit comments

Comments
 (0)