|
| 1 | +# Generated from: |
| 2 | +# https://github.com/plone/meta/tree/2.x/src/plone/meta/default |
| 3 | +# See the inline comments on how to expand/tweak this configuration file |
| 4 | +name: Tests |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + permissions: |
| 13 | + contents: read |
| 14 | + pull-requests: write |
| 15 | + strategy: |
| 16 | + # We want to see all failures: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + os: |
| 20 | + - ["ubuntu", "ubuntu-latest"] |
| 21 | + config: |
| 22 | + # [Python version, visual name, tox env] |
| 23 | + - ["3.14", "6.2 on py3.14", "py314-plone62"] |
| 24 | + - ["3.11", "6.2 on py3.11", "py311-plone62"] |
| 25 | + - ["3.13", "6.1 on py3.13", "py313-plone61"] |
| 26 | + - ["3.10", "6.1 on py3.10", "py310-plone61"] |
| 27 | + - ["3.9", "6.0 on py3.9", "py39-plone60"] |
| 28 | + - ["3.13", "6.0 on py3.13", "py313-plone60"] |
| 29 | + |
| 30 | + runs-on: ${{ matrix.os[1] }} |
| 31 | + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name |
| 32 | + name: ${{ matrix.config[1] }} |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v6 |
| 35 | + with: |
| 36 | + persist-credentials: false |
| 37 | + - name: Install uv + caching |
| 38 | + uses: astral-sh/setup-uv@v8.0.0 |
| 39 | + with: |
| 40 | + enable-cache: true |
| 41 | + cache-dependency-glob: | |
| 42 | + setup.* |
| 43 | + tox.ini |
| 44 | + pyproject.toml |
| 45 | + python-version: ${{ matrix.config[0] }} |
| 46 | + |
| 47 | +## |
| 48 | +# Add extra configuration options in .meta.toml: |
| 49 | +# [github] |
| 50 | +# extra_lines_after_os_dependencies = """ |
| 51 | +# _your own configuration lines_ |
| 52 | +# """ |
| 53 | +## |
| 54 | + - name: Initialize tox |
| 55 | + # the bash one-liner below does not work on Windows |
| 56 | + if: contains(matrix.os, 'ubuntu') |
| 57 | + run: | |
| 58 | + if [ `uvx tox list --no-desc -f init|wc -l` = 1 ]; then uvx --with tox-uv tox -e init;else true; fi |
| 59 | + - name: Test |
| 60 | + run: uvx --with tox-uv tox -e ${{ matrix.config[2] }} |
| 61 | + |
| 62 | + |
| 63 | +## |
| 64 | +# Add extra configuration options in .meta.toml: |
| 65 | +# [github] |
| 66 | +# extra_lines = """ |
| 67 | +# _your own configuration lines_ |
| 68 | +# """ |
| 69 | +## |
0 commit comments