-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (71 loc) · 2.27 KB
/
ci.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
name: Home Assistant CI
on:
push:
pull_request:
jobs:
pre-commit:
name: Pre Commit
runs-on: ubuntu-latest
steps:
- name: Checking out code from GitHub
uses: actions/checkout@v2.3.3
- name: Set up Python 3.7
uses: actions/setup-python@v2.1.2
with:
python-version: 3.7
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install pre-commit
pip list
pre-commit --version
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: Run pre-commit on all files
run: |
pre-commit run --all-files --show-diff-on-failure
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
home_assistant_stable:
needs: pre-commit
runs-on: ubuntu-latest
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v2.3.3
- name: Copy stub files into configuration folder
run: |
cp .stubs/secrets.yaml secrets.yaml
- name: Home Assistant Version
uses: "docker://homeassistant/home-assistant:stable"
with:
args: |
python -m homeassistant --version
- name: Home Assistant Check
uses: "docker://homeassistant/home-assistant:stable"
with:
args: python -m homeassistant --config . --script check_config --info all
env:
DB_CONNECTION: "user:pw@192.168.0.1/db"
home_assistant_beta:
needs: pre-commit
runs-on: ubuntu-latest
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v2.3.3
- name: Copy stub files into configuration folder
run: |
cp .stubs/secrets.yaml secrets.yaml
- name: Home Assistant Version
uses: "docker://homeassistant/home-assistant:beta"
with:
args: |
python -m homeassistant --version
- name: Home Assistant Check
uses: "docker://homeassistant/home-assistant:beta"
with:
args: python -m homeassistant --config ./ --script check_config --info all
env:
DB_CONNECTION: "user:pw@192.168.0.1/db"