generated from ludeeus/ad-hacs
-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (39 loc) · 1.03 KB
/
tests.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
42
43
44
45
46
47
48
name: Tests
on:
push:
pull_request:
schedule:
- cron: "0 0 * * 6"
jobs:
validate:
name: Validate HACS App
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: "actions/checkout@v2"
- name: Ignore issues and topics for non-main branch
if: github.ref != 'refs/heads/master'
run: echo 'IGNORE=issues topics' >> "$GITHUB_ENV"
- name: HACS validation
uses: "hacs/action@main"
with:
category: "appdaemon"
comment: "false"
ignore: "${{ env.IGNORE }}"
tests:
name: Tests & Linting
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: "actions/checkout@v2"
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run pytest
run: pytest
- name: Run linting with autopep8
if: always()
run: autopep8 --diff --recursive --exit-code .