-
-
Notifications
You must be signed in to change notification settings - Fork 101
/
chickn.yaml
75 lines (73 loc) · 2.4 KB
/
chickn.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
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
74
75
variables:
code_dirs:
- pyatv
- tests
- examples
- scripts
pydirs:
- pyatv
- scripts
- examples
cs_exclude_words: infoms,cann,cant,asai,cafs,assertIn
requirements_file: requirements/requirements.txt
miniaudio_package: $(grep miniaudio= requirements/requirements.txt)
dependencies:
files:
- "{requirements_file}"
- requirements/requirements_docs.txt
- requirements/requirements_test.txt
pipeline:
pre:
- name: clean
run: coverage erase
- name: fixup
tags: [all, fixup]
run:
- black .
- isort {code_dirs}
- python scripts/api.py generate
- python scripts/protobuf.py --download generate
rebuild_miniaudio:
# A lot of builds on GitHub Actions result in "Illegal Instruction"
# when calling functions in miniaudio. Seemingly random and not
# always. Likely has to do with some instruction set mismatch, but
# not sure. Rebuilding miniaudio seems to improve the situation,
# so this optional step is used by the tests workflow to do that.
- name: miniaudio
tags: [all, miniaudio]
run:
- "pip uninstall -y miniaudio"
- "pip install --no-binary :all: {miniaudio_package}"
validate:
- name: pylint
run: pylint -j 0 {pydirs}
- name: api
run: python scripts/api.py verify
tags: [all, py3.8, api]
- name: protobuf
run: python scripts/protobuf.py --download verify
- name: flake8
run: flake8 --exclude=pyatv/protocols/mrp/protobuf {pydirs}
- name: black
run: black --fast --check .
- name: pydocstyle
run: pydocstyle -v --match='(?!test_).*[^pb2]\.py' {pydirs}
- name: isort
run: isort -c --diff {code_dirs}
- name: cs_docs
run: codespell -q 6 -L {cs_exclude_words} -S "lib,vendor,_site,api,assets,*~,.sass-cache,*.lock" docs
- name: cs_code
run: codespell -q 4 -L {cs_exclude_words} --skip="*.pyc,*.pyi,*~,tests/data" {pydirs} tests
- name: typing
run: mypy --python-executable "{python_executable}" --ignore-missing-imports --follow-imports=skip pyatv
- name: pytest
run: pytest -n auto --log-level=debug -q -d --timeout=30 --durations=10 --cov --cov-report=term-missing --cov-report=xml tests
post:
- name: report
run:
- coverage report
- coverage html
package:
- name: dist
run: python setup.py sdist bdist_wheel
tags: [all, package]