-
Notifications
You must be signed in to change notification settings - Fork 18
105 lines (82 loc) · 2.66 KB
/
main.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: main
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy3.9', 'pypy3.10']
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install 'tox>=4.4,<5'
- name: Test with Python 3.7
if: matrix.python == '3.7'
run: tox run -x "tox.envlist=py37-pytest{4,5,60,61,62,70,71,72,73,74}"
- name: Test with Python 3.8
if: matrix.python == '3.8'
run: tox run -x "tox.envlist=py38-pytest{4,5,60,61,62,70,71,72,73,74,80}"
- name: Test with Python 3.9
if: matrix.python == '3.9'
run: tox run -x "tox.envlist=py39-pytest{4,5,60,61,62,70,71,72,73,74,80}"
- name: Test with Python 3.10
if: matrix.python == '3.10'
run: tox run -x "tox.envlist=py310-pytest{70,71,72,73,74,80}"
- name: Test with Python 3.11
if: matrix.python == '3.11'
run: tox run -x "tox.envlist=spy311-pytest{73,74,80}"
- name: Test with Python 3.12
if: matrix.python == '3.12'
run: tox run -x "tox.envlist=spy312-pytest{74,80}"
- name: Test with PyPy 3.9
if: matrix.python == 'pypy3.9'
run: tox run -x "tox.envlist=pypy39-pytest{4,5,60,61,62,70,71,72,73,74}"
- name: Test with PyPy 3.10
if: matrix.python == 'pypy3.10'
run: tox run -x "tox.envlist=pypy310-pytest{70,71,72,73,74,80}"
- name: Linting with Flake8
if: matrix.python == '3.11'
run: tox run -e flake8
- name: Ensure full coverage
if: matrix.python == '3.11'
run: tox run -e coverage
deploy:
if: |
github.event_name == 'push' &&
startsWith(github.event.ref, 'refs/tags') &&
github.repository == 'pytest-dev/pytest-describe'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade wheel setuptools setuptools_scm
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_token }}