-
Notifications
You must be signed in to change notification settings - Fork 10
41 lines (37 loc) · 951 Bytes
/
ci.yaml
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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Rye
run: |
wget -qO /tmp/rye.gz https://github.com/mitsuhiko/rye/releases/latest/download/rye-x86_64-linux.gz
gunzip /tmp/rye.gz
chmod +x /tmp/rye
mv /tmp/rye /usr/local/bin/rye
mkdir -p $HOME/.rye
echo "$HOME/.rye/shims" >> $GITHUB_PATH
rye --version
rye show
- name: Rye Sync
run: rye sync
- name: Type Check
run: rye run pyright
- name: Lint
run: rye run ruff check .
- name: Format Check
run: rye run black --check custom_components