|
9 | 9 | - cron: "0 0 1 * *" |
10 | 10 |
|
11 | 11 | jobs: |
12 | | - test: |
| 12 | + unit-tests: |
13 | 13 | name: ${{ matrix.os }} (${{ matrix.python-version }}) |
14 | 14 | runs-on: ${{ matrix.os }} |
15 | | - |
16 | 15 | strategy: |
17 | 16 | fail-fast: false |
18 | 17 | matrix: |
19 | | - python-version: ["pypy-3.7", "3.6", "3.7", "3.8", "3.9", "3.10"] |
| 18 | + python-version: ["pypy-3.9", "3.8", "3.9", "3.10", "3.11", "3.12-dev"] |
20 | 19 | os: [ubuntu-latest, macos-latest, windows-latest] |
21 | 20 | exclude: |
22 | 21 | # pypy3 randomly fails on Windows builds |
23 | 22 | - os: windows-latest |
24 | | - python-version: "pypy-3.7" |
25 | | - |
| 23 | + python-version: "pypy-3.9" |
| 24 | + include: |
| 25 | + - os: ubuntu-latest |
| 26 | + path: ~/.cache/pip |
| 27 | + - os: macos-latest |
| 28 | + path: ~/Library/Caches/pip |
| 29 | + - os: windows-latest |
| 30 | + path: ~\AppData\Local\pip\Cache |
26 | 31 | steps: |
27 | | - # Check out latest code |
28 | | - - uses: actions/checkout@v2 |
29 | | - |
30 | | - # Configure pip cache |
31 | | - - name: Cache pip (Linux) |
32 | | - uses: actions/cache@v2 |
33 | | - if: startsWith(runner.os, 'Linux') |
34 | | - with: |
35 | | - path: ~/.cache/pip |
36 | | - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} |
37 | | - restore-keys: | |
38 | | - ${{ runner.os }}-pip- |
39 | | -
|
40 | | - - name: Cache pip (macOS) |
41 | | - uses: actions/cache@v2 |
42 | | - if: startsWith(runner.os, 'macOS') |
43 | | - with: |
44 | | - path: ~/Library/Caches/pip |
45 | | - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} |
46 | | - restore-keys: | |
47 | | - ${{ runner.os }}-pip- |
48 | | -
|
49 | | - - name: Cache pip (Windows) |
50 | | - uses: actions/cache@v2 |
51 | | - if: startsWith(runner.os, 'Windows') |
| 32 | + - uses: actions/checkout@v3 |
| 33 | + - name: Cache pip |
| 34 | + uses: actions/cache@v3 |
52 | 35 | with: |
53 | | - path: ~\AppData\Local\pip\Cache |
54 | | - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} |
55 | | - restore-keys: | |
56 | | - ${{ runner.os }}-pip- |
57 | | -
|
58 | | - # Set up Python |
| 36 | + path: ${{ matrix.path }} |
| 37 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }} |
| 38 | + restore-keys: ${{ runner.os }}-pip- |
59 | 39 | - name: Set up Python ${{ matrix.python-version }} |
60 | | - uses: actions/setup-python@v2 |
| 40 | + uses: actions/setup-python@v4 |
61 | 41 | with: |
62 | 42 | python-version: ${{ matrix.python-version }} |
63 | | - |
64 | | - # Install dependencies |
65 | 43 | - name: Install dependencies |
66 | 44 | run: | |
67 | 45 | pip install -U pip setuptools wheel |
68 | 46 | pip install -U tox tox-gh-actions |
69 | | -
|
70 | | - # Run tests |
71 | 47 | - name: Test with tox |
72 | 48 | run: tox |
73 | | - |
74 | | - # Upload coverage report |
75 | 49 | - name: Upload coverage to Codecov |
76 | | - uses: codecov/codecov-action@v2 |
| 50 | + uses: codecov/codecov-action@v3 |
77 | 51 | with: |
78 | 52 | file: coverage.xml |
79 | 53 |
|
80 | | - lint: |
| 54 | + linting: |
| 55 | + name: Linting |
81 | 56 | runs-on: ubuntu-latest |
82 | | - |
83 | 57 | steps: |
84 | | - # Check out latest code |
85 | | - - uses: actions/checkout@v2 |
86 | | - |
87 | | - # Set up Python |
88 | | - - name: Set up Python 3.10 |
89 | | - uses: actions/setup-python@v2 |
90 | | - with: |
91 | | - python-version: "3.10" |
92 | | - |
93 | | - # Configure pip cache |
94 | | - - name: Cache pip |
95 | | - uses: actions/cache@v2 |
| 58 | + - uses: actions/checkout@v3 |
| 59 | + - uses: actions/cache@v3 |
96 | 60 | with: |
97 | 61 | path: ~/.cache/pip |
98 | | - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} |
99 | | - restore-keys: | |
100 | | - ${{ runner.os }}-pip- |
101 | | -
|
102 | | - # Configure pre-commit cache |
103 | | - - name: Cache pre-commit |
104 | | - uses: actions/cache@v2 |
| 62 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }} |
| 63 | + restore-keys: ${{ runner.os }}-pip- |
| 64 | + - uses: actions/cache@v3 |
105 | 65 | with: |
106 | 66 | path: ~/.cache/pre-commit |
107 | 67 | key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }} |
108 | | - restore-keys: | |
109 | | - ${{ runner.os }}-pre-commit- |
110 | | -
|
111 | | - # Install dependencies |
| 68 | + restore-keys: ${{ runner.os }}-pre-commit- |
| 69 | + - name: Set up Python ${{ runner.python-version }} |
| 70 | + uses: actions/setup-python@v4 |
| 71 | + with: |
| 72 | + python-version: "3.11" |
112 | 73 | - name: Install dependencies |
113 | 74 | run: | |
114 | 75 | pip install -U pip setuptools wheel |
115 | 76 | pip install -U tox |
116 | | -
|
117 | | - # Lint code |
118 | 77 | - name: Lint code |
119 | | - run: tox -e lint |
120 | | - |
121 | | - # Lint docs |
| 78 | + run: tox -e lint -- --show-diff-on-failure |
122 | 79 | - name: Lint docs |
123 | 80 | run: tox -e docs |
0 commit comments