|
12 | 12 |
|
13 | 13 | jobs: |
14 | 14 | build: |
| 15 | + permissions: |
| 16 | + contents: read |
| 17 | + pull-requests: write |
15 | 18 | strategy: |
16 | 19 | # We want to see all failures: |
17 | 20 | fail-fast: false |
18 | 21 | matrix: |
19 | 22 | os: |
20 | | - - ["ubuntu", "ubuntu-20.04"] |
| 23 | + - ["ubuntu", "ubuntu-latest"] |
21 | 24 | config: |
22 | 25 | # [Python version, tox env] |
23 | | - - ["3.9", "release-check"] |
24 | | - - ["3.9", "lint"] |
25 | | - - ["3.7", "py37"] |
26 | | - - ["3.8", "py38"] |
27 | | - - ["3.9", "py39"] |
28 | | - - ["3.10", "py310"] |
29 | | - - ["3.11", "py311"] |
30 | | - - ["3.12", "py312"] |
31 | | - - ["3.9", "docs"] |
32 | | - - ["3.9", "coverage"] |
| 26 | + - ["3.11", "release-check"] |
| 27 | + - ["3.10", "py310"] |
| 28 | + - ["3.11", "py311"] |
| 29 | + - ["3.12", "py312"] |
| 30 | + - ["3.13", "py313"] |
| 31 | + - ["3.14", "py314"] |
| 32 | + - ["3.11", "docs"] |
| 33 | + - ["3.11", "coverage"] |
33 | 34 |
|
34 | 35 | runs-on: ${{ matrix.os[1] }} |
35 | 36 | if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name |
36 | 37 | name: ${{ matrix.config[1] }} |
37 | 38 | steps: |
38 | | - - uses: actions/checkout@v3 |
39 | | - - name: Set up Python |
40 | | - uses: actions/setup-python@v4 |
| 39 | + - uses: actions/checkout@v5 |
41 | 40 | with: |
42 | | - python-version: ${{ matrix.config[0] }} |
43 | | - - name: Pip cache |
44 | | - uses: actions/cache@v3 |
45 | | - with: |
46 | | - path: ~/.cache/pip |
47 | | - key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }} |
48 | | - restore-keys: | |
49 | | - ${{ runner.os }}-pip-${{ matrix.config[0] }}- |
50 | | - ${{ runner.os }}-pip- |
51 | | - - name: Install dependencies |
| 41 | + persist-credentials: false |
| 42 | + - name: Install additional dependencies |
52 | 43 | run: | |
53 | | - python -m pip install --upgrade pip |
54 | | - pip install tox |
55 | 44 | set -ex |
56 | 45 | sudo apt update |
57 | 46 | sudo apt install -y ldap-utils slapd libldap2-dev libsasl2-dev |
| 47 | + - name: Install uv + caching |
| 48 | + # astral/setup-uv@7.1.3 |
| 49 | + uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 |
| 50 | + with: |
| 51 | + enable-cache: true |
| 52 | + cache-dependency-glob: | |
| 53 | + setup.* |
| 54 | + tox.ini |
| 55 | + python-version: ${{ matrix.config[0] }} |
| 56 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
58 | 57 | - name: Test |
59 | | - run: tox -e ${{ matrix.config[1] }} |
| 58 | + if: ${{ !startsWith(runner.os, 'Mac') }} |
| 59 | + run: uvx --with tox-uv tox -e ${{ matrix.config[1] }} |
| 60 | + - name: Test (macOS) |
| 61 | + if: ${{ startsWith(runner.os, 'Mac') }} |
| 62 | + run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2 |
60 | 63 | - name: Coverage |
61 | 64 | if: matrix.config[1] == 'coverage' |
62 | 65 | run: | |
63 | | - pip install coveralls |
64 | | - coveralls --service=github |
| 66 | + uvx coveralls --service=github |
65 | 67 | env: |
66 | 68 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments