-
Notifications
You must be signed in to change notification settings - Fork 41
71 lines (63 loc) · 1.82 KB
/
Copy pathci.yml
File metadata and controls
71 lines (63 loc) · 1.82 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
name: Continuous Integration
on:
push:
branches: [main]
pull_request:
jobs:
python:
strategy:
fail-fast: false
matrix:
python: ['3.11', '3.12', '3.13', '3.14', '3.14t']
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python }}
- name: update APT
run: sudo apt-get update
- name: Install dependencies
run: sudo apt-get install -y libsystemd-dev
- name: Install environment
run: uv sync --all-extras --dev
- name: Assert Python Version
run: uv run python -V
- name: Run unit tests
run: uv run pytest --cov=pystemd tests
formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Run ruff
uses: astral-sh/ruff-action@v3
with:
src: >-
pystemd
examples
tests
e2e
- name: Run isort
uses: isort/isort-action@v1
- name: Formatting hint
if: failure()
run: |
echo "::notice::PROTIP: You can install pre-commit hooks to automatically format your code before each commit. Run 'uv run pre-commit install' and never have to resubmit a PR because of formatting errors! See CONTRIBUTING.md for more details."
typing:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: update APT
run: sudo apt-get update
- name: Install dependencies
run: sudo apt-get install -y libsystemd-dev
- name: install environment
run: uv sync --all-extras --dev
- name: run pyrefly
run: uv run pyrefly check pystemd examples tests