Repository navigation
87 lines (80 loc) · 2.22 KB
/
Copy pathci.yml
File metadata and controls
87 lines (80 loc) · 2.22 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: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test (Python ${{ matrix.python-version }})
# Pinned: Python 3.9 builds aren't published for newer Ubuntu images.
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: python -m pip install -e . pytest
- name: Test
run: python -m pytest
test-minimum-httpx:
name: Test (Python 3.9, httpx 0.24.0)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-python@v7
with:
python-version: "3.9"
- name: Install the oldest supported httpx
run: python -m pip install -e . pytest "httpx==0.24.0"
- name: Test
run: python -m pytest
lint:
name: Lint and type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-python@v7
with:
python-version: "3.13"
- name: Install
run: python -m pip install -e ".[dev]"
- run: ruff check .
- run: ruff format --check .
- run: mypy
build:
name: Build distributions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-python@v7
with:
python-version: "3.13"
- name: Build
run: |
python -m pip install build twine
python -m build
python -m twine check --strict dist/*
- name: Install the wheel and import it
run: |
python -m venv /tmp/wheel-check
/tmp/wheel-check/bin/pip install dist/*.whl
cd /tmp && /tmp/wheel-check/bin/python -I -c "import flaggr; print(flaggr.__version__)"