This repository has been archived by the owner on Jan 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
85 lines (73 loc) · 2.32 KB
/
tox.yml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: tox
on:
create: # is used for publishing to TestPyPI
tags: # any tag regardless of its name, no branches
- "**"
push: # only publishes pushes to the main branch to TestPyPI
branches: # any integration branch but not tag
- "main"
pull_request:
release:
types:
- published # It seems that you can publish directly witout creating
schedule:
- cron: 1 0 * * * # Run daily at 0:01 UTC
jobs:
build:
name: ${{ matrix.name || matrix.tox_env }}
# ubuntu-latest is current older and we need last podman toolkit.
# https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- tox_env: lint
python-version: 3.9
# - tox_env: docs
- tox_env: pkg
python-version: 3.9
- name: py39
tox_env: py39
PREFIX: PYTEST_REQPASS=5
python-version: 3.9
- name: py310
tox_env: py310
PREFIX: PYTEST_REQPASS=5
python-version: "3.10"
- name: py311
tox_env: py311,py311-devel
PREFIX: PYTEST_REQPASS=5
python-version: "3.11"
- name: py311
tox_env: py-devel
PREFIX: PYTEST_REQPASS=5
python-version: "3.11"
steps:
- name: Check out src from Git
uses: actions/checkout@v2
with:
fetch-depth: 0 # needed by setuptools-scm
- name: Set up Python version
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
podman version
podman info
python -m pip install -U "pip>=21.2.4" "tox>=3.24.2"
- name: Run tox -e ${{ matrix.tox_env }}
run: |
echo "${{ matrix.PREFIX }} tox -e ${{ matrix.tox_env }}"
${{ matrix.PREFIX }} tox -e ${{ matrix.tox_env }}
check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}