|
11 | 11 | - "mss/**" |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - lint: |
15 | | - name: Code quality checks |
| 14 | + quality: |
| 15 | + name: Quality |
16 | 16 | runs-on: ubuntu-latest |
17 | 17 | steps: |
18 | 18 | - uses: actions/checkout@v3 |
19 | | - with: |
20 | | - ref: ${{ github.event.inputs.branch }} |
21 | | - - uses: actions/setup-python@v4 |
22 | | - with: |
23 | | - python-version: "3.x" |
24 | | - - name: Install test dependencies |
25 | | - run: python -m pip install -U pip wheel tox |
26 | | - - name: Tests |
27 | | - run: python -m tox -e lint |
28 | | - |
29 | | - types: |
30 | | - name: Types checks |
31 | | - runs-on: ubuntu-latest |
32 | | - steps: |
33 | | - - uses: actions/checkout@v3 |
34 | | - with: |
35 | | - ref: ${{ github.event.inputs.branch }} |
36 | 19 | - uses: actions/setup-python@v4 |
37 | 20 | with: |
38 | 21 | python-version: "3.x" |
39 | | - - name: Install test dependencies |
40 | | - run: python -m pip install -U pip wheel tox |
| 22 | + cache: pip |
| 23 | + cache-dependency-path: dev-requirements.txt |
| 24 | + - name: Install dependencies |
| 25 | + run: | |
| 26 | + python -m pip install -U pip wheel |
| 27 | + python -m pip install -r dev-requirements.txt |
41 | 28 | - name: Tests |
42 | | - run: python -m tox -e types |
| 29 | + run: ./check.sh |
43 | 30 |
|
44 | 31 | documentation: |
45 | | - name: Documentation build |
| 32 | + name: Documentation |
46 | 33 | runs-on: ubuntu-latest |
47 | 34 | steps: |
48 | 35 | - uses: actions/checkout@v3 |
49 | | - with: |
50 | | - ref: ${{ github.event.inputs.branch }} |
51 | 36 | - uses: actions/setup-python@v4 |
52 | 37 | with: |
53 | 38 | python-version: "3.x" |
| 39 | + cache: pip |
| 40 | + cache-dependency-path: dev-requirements.txt |
54 | 41 | - name: Install test dependencies |
55 | | - run: python -m pip install -U pip wheel tox |
| 42 | + run: | |
| 43 | + python -m pip install -U pip wheel |
| 44 | + python -m pip install -r dev-requirements.txt |
56 | 45 | - name: Tests |
57 | | - run: python -m tox -e docs |
| 46 | + run: | |
| 47 | + sphinx-build -d docs docs/source docs_out --color -W -bhtml |
58 | 48 |
|
59 | 49 | tests: |
60 | | - name: "${{ matrix.os }} for ${{ matrix.python }}" |
61 | | - runs-on: ${{ matrix.os }} |
| 50 | + name: "${{ matrix.os.emoji }} ${{ matrix.python.name }}" |
| 51 | + runs-on: ${{ matrix.os.runs-on }} |
62 | 52 | strategy: |
63 | 53 | fail-fast: false |
64 | 54 | matrix: |
65 | | - os: [ubuntu-latest, windows-latest, macos-latest] |
66 | | - python: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
| 55 | + os: |
| 56 | + - emoji: 🐧 |
| 57 | + runs-on: [ubuntu-latest] |
| 58 | + - emoji: 🍎 |
| 59 | + runs-on: [macos-latest] |
| 60 | + - emoji: 🪟 |
| 61 | + runs-on: [windows-latest] |
| 62 | + python: |
| 63 | + - name: CPython 3.7 |
| 64 | + runs-on: "3.7" |
| 65 | + - name: CPython 3.8 |
| 66 | + runs-on: "3.8" |
| 67 | + - name: CPython 3.9 |
| 68 | + runs-on: "3.9" |
| 69 | + - name: CPython 3.10 |
| 70 | + runs-on: "3.10" |
| 71 | + - name: CPython 3.11 |
| 72 | + runs-on: "3.11" |
| 73 | + - name: PyPy 3.9 |
| 74 | + runs-on: "pypy-3.9" |
67 | 75 | steps: |
68 | 76 | - uses: actions/checkout@v3 |
69 | | - with: |
70 | | - ref: ${{ github.event.inputs.branch }} |
71 | 77 | - uses: actions/setup-python@v4 |
72 | 78 | with: |
73 | | - python-version: ${{ matrix.python }} |
| 79 | + python-version: ${{ matrix.python.runs-on }} |
| 80 | + cache: pip |
| 81 | + cache-dependency-path: dev-requirements.txt |
74 | 82 | - name: Install test dependencies |
75 | | - run: python -m pip install -U pip wheel tox |
| 83 | + run: | |
| 84 | + python -m pip install -U pip wheel |
| 85 | + python -m pip install -r dev-requirements.txt |
76 | 86 | - name: Tests on GNU/Linux |
77 | | - if: matrix.os == 'ubuntu-latest' |
| 87 | + if: matrix.os.emoji == '🐧' |
78 | 88 | run: | |
79 | 89 | export DISPLAY=:99 |
80 | | - sudo Xvfb -ac ${DISPLAY} -screen 0 1280x1024x24 > /dev/null 2>&1 & |
81 | | - python -m tox -e py |
| 90 | + sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & |
| 91 | + python -m pytest |
82 | 92 | - name: Tests on other platforms |
83 | | - if: matrix.os != 'ubuntu-latest' |
84 | | - run: python -m tox -e py |
| 93 | + if: matrix.os.emoji != '🐧' |
| 94 | + run: python -m pytest |
0 commit comments