-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (47 loc) · 1.41 KB
/
main.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
name: tests
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
python:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- pypy-3.9
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install pymarkups and all optional dependencies
run: |
pip install --upgrade pip setuptools
pip install .[markdown,restructuredtext,textile,asciidoc,highlighting]
pip install codecov pymdown-extensions
- name: Run tests
run: coverage run -m unittest discover -s tests -v
- name: Run the doctest
run: python -m doctest README.rst -v
- name: Upload reports to Codecov
if: ${{ matrix.python == '3.13' }}
run: codecov
static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: Install flake8, isort and mypy
run: |
python -m pip install flake8 isort mypy
python -m pip install types-docutils types-PyYAML types-Markdown
- name: Run flake8
run: flake8 --max-line-length=88 .
- name: Run isort
run: isort --check-only .
- name: Run mypy
run: mypy --ignore-missing-imports --strict .