File: tests.yml

package info (click to toggle)
python-roman 5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 148 kB
  • sloc: python: 202; makefile: 6
file content (64 lines) | stat: -rw-r--r-- 1,900 bytes parent folder | download
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
name: tests

on:
  push:
  pull_request:
  schedule:
    - cron: '0 12 * * 0'  # run once a week on Sunday
  # Allow to run this workflow manually from the Actions tab
  workflow_dispatch:

jobs:
  build:
    permissions:
      contents: read
      pull-requests: write
    strategy:
      # We want to see all failures:
      fail-fast: false
      matrix:
        os:
        - ["ubuntu", "ubuntu-latest"]
        config:
        # [Python version, tox env]
        - ["3.11", "release-check"]
        - ["3.10", "py310"]
        - ["3.11", "py311"]
        - ["3.12", "py312"]
        - ["3.13", "py313"]
        - ["3.14", "py314"]
        - ["3.15", "py315"]
        - ["pypy-3.11", "pypy3"]
        - ["3.11", "coverage"]

    runs-on: ${{ matrix.os[1] }}
    if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
    name: ${{ matrix.config[1] }}
    steps:
    - uses: actions/checkout@v5
      with:
        persist-credentials: false
    - name: Install uv + caching
      # astral/setup-uv@7.1.2
      uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41
      with:
        enable-cache: true
        cache-dependency-glob: |
          setup.*
          tox.ini
        python-version: ${{ matrix.config[0] }}
        github-token: ${{ secrets.GITHUB_TOKEN }}
    - name: Test
      if: ${{ !startsWith(runner.os, 'Mac') }}
      run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}
    - name: Test (macOS)
      if: ${{ startsWith(runner.os, 'Mac') }}
      run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2
    - name: Coverage
      if: matrix.config[1] == 'coverage'
      run: |
        uvx coveralls --service=github
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}