-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 854 Bytes
/
Copy pathci.yml
File metadata and controls
35 lines (32 loc) · 854 Bytes
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
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
# Pinned: an unpinned ruff silently picks up new default rules and
# turns CI red on commits that changed nothing.
- run: pip install ruff==0.16.4
- run: ruff check custom_components/
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- run: pip install pytest pytest-asyncio
- run: pytest tests/ --tb=short
if: ${{ hashFiles('tests/**/*') != '' }}