-
-
Notifications
You must be signed in to change notification settings - Fork 603
56 lines (48 loc) · 1.62 KB
/
Copy pathci.yml
File metadata and controls
56 lines (48 loc) · 1.62 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
name: CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
workflow_dispatch: # to allow manual re-runs
jobs:
linting:
name: "Perform linting checks"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: "actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5" # v4.3.1
- uses: "astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e" # v6
with:
enable-cache: true
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: uv sync --extra docs
- name: "Run pre-commit hooks"
run: uv run pre-commit run --all-files --verbose
tests:
name: "Python ${{ matrix.python-version}} on ${{ matrix.os }}"
needs: linting
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: "actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5" # v4.3.1
- uses: "astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e" # v6
with:
enable-cache: true
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: uv sync --all-extras
- name: "Run tests"
run: uv run pytest --cov miio --cov-report xml
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac" # v5.5.5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}