Repository navigation
65 lines (59 loc) · 1.7 KB
/
Copy pathci.yml
File metadata and controls
65 lines (59 loc) · 1.7 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
name: CI
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.13"
- run: pip install ruff
- run: ruff check .
- run: ruff format --check .
test:
# Python 3.9 builds stop at Ubuntu 24.04
runs-on: ${{ matrix.python-version == '3.9' && 'ubuntu-24.04' || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e ".[test]"
- run: pytest -q
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.13"
- run: pip install build twine
- run: python -m build
- run: twine check --strict dist/*
- name: Install the wheel into an empty venv
run: |
python -m venv /tmp/wheel
/tmp/wheel/bin/pip install dist/*.whl
/tmp/wheel/bin/python -c "
import importlib.metadata as metadata
import clicktag, clicktag.asgi, clicktag.wsgi
assert not [r for r in metadata.requires('clicktag') or [] if 'extra ==' not in r], 'runtime deps found'
print('clicktag', clicktag.__version__)
"
- uses: actions/upload-artifact@v7
with:
name: dist
path: dist/