-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.23 KB
/
check.yml
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
name: Check
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "33 3 * * *"
jobs:
hacs:
runs-on: ubuntu-latest
steps:
- uses: hacs/action@main
with:
category: integration
ignore: brands information
hassfest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: home-assistant/actions/hassfest@master
lint:
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
venv
key: >-
lint-${{ hashFiles(
'.github/requirements.txt',
'requirements/dev-requirements.txt'
) }}
restore-keys: lint-
- name: Install dependencies
run: |
set -euxo pipefail
python3 -m venv venv
venv/bin/python3 -m pip install -Ur .github/requirements.txt
- run: venv/bin/gitlint --commits "origin/$GITHUB_BASE_REF..HEAD"
if: github.event_name == 'pull_request'
- uses: pre-commit/[email protected]