forked from esphome/esphome
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from esphome/dev
downmerge
- Loading branch information
Showing
632 changed files
with
27,271 additions
and
3,243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,4 @@ indent_size = 2 | |
[*.{yaml,yml}] | ||
indent_style = space | ||
indent_size = 2 | ||
quote_type = single |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Issue Tracker | ||
url: https://github.com/esphome/issues | ||
about: Please create bug reports in the dedicated issue tracker. | ||
- name: Feature Request Tracker | ||
url: https://github.com/esphome/feature-requests | ||
about: Please create feature requests in the dedicated feature request tracker. | ||
- name: Frequently Asked Question | ||
url: https://esphome.io/guides/faq.html | ||
about: Please view the FAQ for common questions and what to include in a bug report. | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
ignore: | ||
# Hypotehsis is only used for testing and is updated quite often | ||
- dependency-name: hypothesis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: CI for docker images | ||
|
||
# Only run when docker paths change | ||
on: | ||
push: | ||
branches: [dev, beta, master] | ||
paths: | ||
- 'docker/**' | ||
- '.github/workflows/**' | ||
|
||
pull_request: | ||
paths: | ||
- 'docker/**' | ||
- '.github/workflows/**' | ||
|
||
jobs: | ||
check-docker: | ||
name: Build docker containers | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: [amd64, armv7, aarch64] | ||
build_type: ["hassio", "docker"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up env variables | ||
run: | | ||
base_version="2.6.0" | ||
if [[ "${{ matrix.build_type }}" == "hassio" ]]; then | ||
build_from="esphome/esphome-hassio-base-${{ matrix.arch }}:${base_version}" | ||
build_to="esphome/esphome-hassio-${{ matrix.arch }}" | ||
dockerfile="docker/Dockerfile.hassio" | ||
else | ||
build_from="esphome/esphome-base-${{ matrix.arch }}:${base_version}" | ||
build_to="esphome/esphome-${{ matrix.arch }}" | ||
dockerfile="docker/Dockerfile" | ||
fi | ||
echo "BUILD_FROM=${build_from}" >> $GITHUB_ENV | ||
echo "BUILD_TO=${build_to}" >> $GITHUB_ENV | ||
echo "DOCKERFILE=${dockerfile}" >> $GITHUB_ENV | ||
- name: Pull for cache | ||
run: | | ||
docker pull "${BUILD_TO}:dev" || true | ||
- name: Register QEMU binfmt | ||
run: docker run --rm --privileged multiarch/qemu-user-static:5.0.0-2 --reset -p yes | ||
- run: | | ||
docker build \ | ||
--build-arg "BUILD_FROM=${BUILD_FROM}" \ | ||
--build-arg "BUILD_VERSION=ci" \ | ||
--cache-from "${BUILD_TO}:dev" \ | ||
--file "${DOCKERFILE}" \ | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
# THESE JOBS ARE COPIED IN release.yml and release-dev.yml | ||
# PLEASE ALSO UPDATE THOSE FILES WHEN CHANGING LINES HERE | ||
name: CI | ||
|
||
on: | ||
push: | ||
# On dev branch release-dev already performs CI checks | ||
# On other branches the `pull_request` trigger will be used | ||
branches: [beta, master] | ||
|
||
pull_request: | ||
|
||
jobs: | ||
lint-clang-format: | ||
runs-on: ubuntu-latest | ||
# cpp lint job runs with esphome-lint docker image so that clang-format-* | ||
# doesn't have to be installed | ||
container: esphome/esphome-lint:latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Cache platformio intermediary files (like libraries etc) | ||
# Note: platformio platform versions should be cached via the esphome-lint image | ||
- name: Cache Platformio | ||
uses: actions/cache@v1 | ||
with: | ||
path: .pio | ||
key: lint-cpp-pio-${{ hashFiles('platformio.ini') }} | ||
restore-keys: | | ||
lint-cpp-pio- | ||
# Set up the pio project so that the cpp checks know how files are compiled | ||
# (build flags, libraries etc) | ||
- name: Set up platformio environment | ||
run: pio init --ide atom | ||
|
||
- name: Run clang-format | ||
run: script/clang-format -i | ||
- name: Suggest changes | ||
run: script/ci-suggest-changes | ||
|
||
lint-clang-tidy: | ||
runs-on: ubuntu-latest | ||
# cpp lint job runs with esphome-lint docker image so that clang-format-* | ||
# doesn't have to be installed | ||
container: esphome/esphome-lint:latest | ||
# Split clang-tidy check into 4 jobs. Each one will check 1/4th of the .cpp files | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
split: [1, 2, 3, 4] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Cache platformio intermediary files (like libraries etc) | ||
# Note: platformio platform versions should be cached via the esphome-lint image | ||
- name: Cache Platformio | ||
uses: actions/cache@v1 | ||
with: | ||
path: .pio | ||
key: lint-cpp-pio-${{ hashFiles('platformio.ini') }} | ||
restore-keys: | | ||
lint-cpp-pio- | ||
# Set up the pio project so that the cpp checks know how files are compiled | ||
# (build flags, libraries etc) | ||
- name: Set up platformio environment | ||
run: pio init --ide atom | ||
|
||
|
||
- name: Register problem matchers | ||
run: | | ||
echo "::add-matcher::.github/workflows/matchers/clang-tidy.json" | ||
echo "::add-matcher::.github/workflows/matchers/gcc.json" | ||
- name: Run clang-tidy | ||
run: script/clang-tidy --all-headers --fix --split-num 4 --split-at ${{ matrix.split }} | ||
- name: Suggest changes | ||
run: script/ci-suggest-changes | ||
|
||
lint-python: | ||
# Don't use the esphome-lint docker image because it may contain outdated requirements. | ||
# This way, all dependencies are cached via the cache action. | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
- name: Cache pip modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: esphome-pip-3.7-${{ hashFiles('setup.py') }} | ||
restore-keys: | | ||
esphome-pip-3.7- | ||
- name: Set up python environment | ||
run: script/setup | ||
|
||
- name: Register problem matchers | ||
run: | | ||
echo "::add-matcher::.github/workflows/matchers/ci-custom.json" | ||
echo "::add-matcher::.github/workflows/matchers/lint-python.json" | ||
echo "::add-matcher::.github/workflows/matchers/python.json" | ||
- name: Lint Custom | ||
run: script/ci-custom.py | ||
- name: Lint Python | ||
run: script/lint-python | ||
- name: Lint CODEOWNERS | ||
run: script/build_codeowners.py --check | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test: | ||
- test1 | ||
- test2 | ||
- test3 | ||
- test4 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
- name: Cache pip modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: esphome-pip-3.7-${{ hashFiles('setup.py') }} | ||
restore-keys: | | ||
esphome-pip-3.7- | ||
# Use per test platformio cache because tests have different platform versions | ||
- name: Cache ~/.platformio | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.platformio | ||
key: test-home-platformio-${{ matrix.test }}-${{ hashFiles('esphome/core_config.py') }} | ||
restore-keys: | | ||
test-home-platformio-${{ matrix.test }}- | ||
- name: Set up environment | ||
run: script/setup | ||
|
||
|
||
- name: Register problem matchers | ||
run: | | ||
echo "::add-matcher::.github/workflows/matchers/gcc.json" | ||
echo "::add-matcher::.github/workflows/matchers/python.json" | ||
- run: esphome tests/${{ matrix.test }}.yaml compile | ||
|
||
pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
- name: Cache pip modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: esphome-pip-3.7-${{ hashFiles('setup.py') }} | ||
restore-keys: | | ||
esphome-pip-3.7- | ||
- name: Set up environment | ||
run: script/setup | ||
- name: Install Github Actions annotator | ||
run: pip install pytest-github-actions-annotate-failures | ||
|
||
- name: Register problem matchers | ||
run: | | ||
echo "::add-matcher::.github/workflows/matchers/python.json" | ||
- name: Run pytest | ||
run: | | ||
pytest \ | ||
-qq \ | ||
--durations=10 \ | ||
-o console_output_style=count \ | ||
tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "ci-custom", | ||
"pattern": [ | ||
{ | ||
"regexp": "^ERROR (.*):(\\d+):(\\d+) - (.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "clang-tidy", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.*):(\\d+):(\\d+):\\s+(error):\\s+(.*) \\[([a-z0-9,\\-]+)\\]\\s*$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"severity": 4, | ||
"message": 5 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "gcc", | ||
"severity": "error", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"severity": 4, | ||
"message": 5 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "flake8", | ||
"severity": "error", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.*):(\\d+) - ([EFCDNW]\\d{3}.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"message": 3 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "pylint", | ||
"severity": "error", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.*):(\\d+) - (\\[[EFCRW]\\d{4}\\(.*\\),.*\\].*)$", | ||
"file": 1, | ||
"line": 2, | ||
"message": 3 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "python", | ||
"pattern": [ | ||
{ | ||
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)$", | ||
"file": 1, | ||
"line": 2 | ||
}, | ||
{ | ||
"regexp": "^\\s*raise\\s(.*)\\(\\'(.*)\\'\\)$", | ||
"message": 2 | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.