|
1 |
| -name: test |
| 1 | +name: Tests |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
5 | 5 | branches:
|
6 | 6 | - master
|
7 |
| - tags-ignore: |
8 |
| - - v* |
| 7 | + |
| 8 | + schedule: |
| 9 | + - cron: '0 15 * * *' # Run daily at 14:00 UTC |
| 10 | + |
9 | 11 | pull_request:
|
10 |
| - workflow_call: |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 15 | + cancel-in-progress: ${{ ! contains(github.ref, github.event.repository.default_branch) }} |
11 | 16 |
|
12 | 17 | jobs:
|
13 | 18 | test:
|
14 |
| - runs-on: ${{ matrix.os }} |
| 19 | + name: ${{ matrix.python-version }} |
| 20 | + runs-on: ubuntu-latest |
15 | 21 | strategy:
|
16 | 22 | fail-fast: false
|
17 | 23 | matrix:
|
18 |
| - python: ["3.7", "3.8", "3.9", "3.10", "pypy-3.8"] |
19 |
| - os: [ubuntu-latest, windows-latest] |
| 24 | + python-version: ["3.7", "3.8", "3.9", "3.10"] |
20 | 25 | include:
|
21 |
| - - python: "3.7" |
22 |
| - tox_env: "py37" |
23 |
| - - python: "3.8" |
24 |
| - tox_env: "py38" |
25 |
| - - python: "3.9" |
26 |
| - tox_env: "py39" |
27 |
| - - python: "3.10" |
28 |
| - tox_env: "py310" |
29 |
| - - python: "pypy-3.8" |
30 |
| - tox_env: "pypy3" |
| 26 | + - python-version: pypy3.9 |
| 27 | + tox-env: py3.9 |
| 28 | + - python-version: 3.11-dev |
| 29 | + tox-env: devel |
| 30 | + |
31 | 31 | steps:
|
32 |
| - - uses: actions/checkout@v3 |
33 |
| - - name: Set up Python |
34 |
| - uses: actions/setup-python@v3 |
35 |
| - with: |
36 |
| - python-version: ${{ matrix.python }} |
37 |
| - - name: Install tox |
38 |
| - run: | |
39 |
| - python -m pip install --upgrade pip |
40 |
| - pip install tox |
41 |
| - - name: Cache tox environments |
42 |
| - uses: actions/cache@v3 |
43 |
| - with: |
44 |
| - path: .tox |
45 |
| - key: tox-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }} |
46 |
| - - name: Test |
47 |
| - run: tox -e ${{ matrix.tox_env }} |
| 32 | + - uses: actions/checkout@v3 |
| 33 | + |
| 34 | + - name: Set up python |
| 35 | + uses: actions/setup-python@v4 |
| 36 | + with: |
| 37 | + python-version: ${{ matrix.python-version }} |
| 38 | + |
| 39 | + - name: Install tox |
| 40 | + run: | |
| 41 | + python -m pip install --upgrade pip |
| 42 | + pip install tox |
| 43 | +
|
| 44 | + - name: Cache tox environments |
| 45 | + uses: actions/cache@v3 |
| 46 | + with: |
| 47 | + path: .tox |
| 48 | + key: tox-ubuntu-latest-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} |
| 49 | + restore-keys: | |
| 50 | + tox-ubuntu-latest-${{ matrix.python-version }}- |
| 51 | +
|
| 52 | + - name: Run tests |
| 53 | + if: ${{ ! matrix.tox-env }} |
| 54 | + run: tox -e py${{ matrix.python-version }} |
| 55 | + |
| 56 | + - name: Run tests |
| 57 | + if: ${{ matrix.tox-env }} |
| 58 | + run: tox -e ${{ matrix.tox-env }} |
0 commit comments