55 branches : [master]
66 pull_request : {}
77
8+ permissions :
9+ contents : read
10+
811jobs :
12+ lint :
13+ name : " flake8 on code"
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v7
17+ - name : Set up Python 3.13
18+ uses : actions/setup-python@v7
19+ with :
20+ python-version : " 3.13"
21+ - name : Install dependencies
22+ run : |
23+ python -m pip install --upgrade pip
24+ pip install flake8
25+ - name : Lint with flake8
26+ run : |
27+ # stop the build if there are Python syntax errors or undefined names
28+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
29+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
30+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
31+
932 build :
33+ name : " Build and check distributions"
34+ runs-on : ubuntu-latest
35+ steps :
36+ - uses : actions/checkout@v7
37+ - name : Set up Python 3.13
38+ uses : actions/setup-python@v7
39+ with :
40+ python-version : " 3.13"
41+ - name : Install build tools
42+ run : |
43+ python -m pip install --upgrade pip
44+ pip install build twine
45+ - name : Build sdist and wheel
46+ run : python -m build
47+ - name : Check distributions
48+ run : twine check --strict dist/*
1049
50+ docs :
51+ name : " Build documentation"
1152 runs-on : ubuntu-latest
53+ steps :
54+ - uses : actions/checkout@v7
55+ - name : Set up Python 3.13
56+ uses : actions/setup-python@v7
57+ with :
58+ python-version : " 3.13"
59+ - name : Install dependencies
60+ run : |
61+ python -m pip install --upgrade pip
62+ pip install -r doc/requirements.txt
63+ - name : Build HTML docs
64+ run : sphinx-build -W --keep-going -b html doc doc/_build/html
65+
66+ test :
67+ needs : [lint]
68+ runs-on : ${{ matrix.os }}
1269 strategy :
1370 fail-fast : false
1471 matrix :
15- python-version : ["3.10", "3.11", "3.12", "3.13", "3.14"]
72+ os : [ubuntu-latest]
73+ python-version : ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.11"]
74+ include :
75+ - os : windows-latest
76+ python-version : " 3.13"
77+ - os : macos-latest
78+ python-version : " 3.13"
1679
1780 steps :
1881 - uses : actions/checkout@v7
2386 - name : Install dependencies
2487 run : |
2588 python -m pip install --upgrade pip
26- pip install flake8 pytest hypothesis
27- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28- pip install coverage
29- # - name: Lint with flake8
30- # run: |
31- # stop the build if there are Python syntax errors or undefined names
32- # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
34- # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
89+ pip install -r requirements.txt -r requirements-dev.txt
3590 - name : Test
3691 run : |
3792 coverage run tests.py
@@ -46,11 +101,11 @@ jobs:
46101 uses : coverallsapp/github-action@v2
47102 with :
48103 file : coverage.lcov
49- flag-name : python-${{ matrix.python-version }}
104+ flag-name : ${{ matrix.os }}- python-${{ matrix.python-version }}
50105 parallel : true
51106
52107 coverage :
53- needs : build
108+ needs : test
54109 if : ${{ always() }}
55110 runs-on : ubuntu-latest
56111 steps :
0 commit comments