-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (66 loc) · 1.72 KB
/
pytest.yml
File metadata and controls
87 lines (66 loc) · 1.72 KB
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
name: pytest
permissions:
contents: read
on:
- pull_request
- push
env:
PYTHON_LATEST_VERSION: '3.14'
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: dependencies
run: uv sync --locked --extra dev
- name: pytest
run: uv run pytest
wheels:
runs-on: ${{ matrix.os }}
needs: pytest
if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags')"
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v6
- name: recovery tag information
run: git fetch --tags --force
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_LATEST_VERSION }}
cache: 'pip'
- name: install cibuildwheel
run: pip install cibuildwheel
- name: build wheels
run: python -m cibuildwheel
- uses: actions/upload-artifact@v5
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
upload:
runs-on: ubuntu-latest
needs: wheels
environment:
name: pypi
url: https://pypi.org/project/apyds
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v6
with:
pattern: wheels-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist