Debian Codegraph @

.github/workflows/main.yml

raw symbols SCIP
1 name: main
2
3 on:
4 push:
5 branches:
6 - "*"
7 tags:
8 - "*"
9
10 pull_request:
11 branches:
12 - main
13
14 jobs:
15 build:
16 runs-on: ${{ matrix.os }}
17
18 strategy:
19 fail-fast: false
20 matrix:
21 name: [
22 "windows-py39",
23 "windows-py313",
24 "windows-pypy3",
25
26 "ubuntu-py39-pytestmain",
27 "ubuntu-py39",
28 "ubuntu-py310",
29 "ubuntu-py311",
30 "ubuntu-py312",
31 "ubuntu-py313",
32 "ubuntu-pypy3",
33 "ubuntu-benchmark",
34 ]
35
36 include:
37 - name: "windows-py39"
38 python: "3.9"
39 os: windows-latest
40 tox_env: "py39"
41 - name: "windows-py313"
42 python: "3.13"
43 os: windows-latest
44 tox_env: "py313"
45 - name: "windows-pypy3"
46 python: "pypy3.9"
47 os: windows-latest
48 tox_env: "pypy3"
49 - name: "ubuntu-py39-pytestmain"
50 python: "3.9"
51 os: ubuntu-latest
52 tox_env: "py39-pytestmain"
53 use_coverage: true
54 - name: "ubuntu-py39"
55 python: "3.9"
56 os: ubuntu-latest
57 tox_env: "py39"
58 use_coverage: true
59 - name: "ubuntu-py310"
60 python: "3.10"
61 os: ubuntu-latest
62 tox_env: "py310"
63 - name: "ubuntu-py311"
64 python: "3.11"
65 os: ubuntu-latest
66 tox_env: "py311"
67 use_coverage: true
68 - name: "ubuntu-py312"
69 python: "3.12"
70 os: ubuntu-latest
71 tox_env: "py312"
72 use_coverage: true
73 - name: "ubuntu-py313"
74 python: "3.13"
75 os: ubuntu-latest
76 tox_env: "py313"
77 use_coverage: true
78 - name: "ubuntu-pypy3"
79 python: "pypy3.9"
80 os: ubuntu-latest
81 tox_env: "pypy3"
82 use_coverage: true
83 - name: "ubuntu-benchmark"
84 python: "3.9"
85 os: ubuntu-latest
86 tox_env: "benchmark"
87
88 steps:
89 - uses: actions/checkout@v4
90 with:
91 fetch-depth: 0
92
93 - name: Set up Python ${{ matrix.python }}
94 uses: actions/setup-python@v5
95 with:
96 python-version: ${{ matrix.python }}
97 allow-prereleases: true
98
99 - name: Install dependencies
100 run: |
101 python -m pip install --upgrade pip setuptools
102 python -m pip install tox coverage
103
104 - name: Test without coverage
105 if: "! matrix.use_coverage"
106 run: "tox -e ${{ matrix.tox_env }}"
107
108 - name: Test with coverage
109 if: "matrix.use_coverage"
110 run: "tox -e ${{ matrix.tox_env }}-coverage"
111
112 - name: Upload coverage
113 if: matrix.use_coverage && github.repository == 'pytest-dev/pluggy'
114 uses: codecov/codecov-action@v5
115 continue-on-error: true
116 with:
117 fail_ci_if_error: true
118 files: ./coverage.xml
119 verbose: true
120
121 deploy:
122 if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pluggy'
123 runs-on: ubuntu-latest
124 permissions:
125 id-token: write
126 steps:
127 - uses: actions/checkout@v4
128 with:
129 fetch-depth: 0
130
131 - uses: actions/setup-python@v5
132 with:
133 python-version: "3.x"
134
135 - name: Install dependencies
136 run: |
137 python -m pip install --upgrade pip
138 pip install --upgrade build
139
140 - name: Build package
141 run: python -m build --sdist --wheel --outdir dist/
142
143 - name: Publish package
144 uses: pypa/[email protected]
145 with:
146 attestations: true