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 remote-tracking branch 'origin/dev' into keyboard_dev
- Loading branch information
Showing
503 changed files
with
20,375 additions
and
5,516 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
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,38 @@ | ||
name: Restore Python | ||
inputs: | ||
python-version: | ||
description: Python version to restore | ||
required: true | ||
type: string | ||
cache-key: | ||
description: Cache key to use | ||
required: true | ||
type: string | ||
outputs: | ||
python-version: | ||
description: Python version restored | ||
value: ${{ steps.python.outputs.python-version }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Python ${{ inputs.python-version }} | ||
id: python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ inputs.cache-key }} | ||
- name: Create Python virtual environment | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: | | ||
python -m venv venv | ||
. venv/bin/activate | ||
python --version | ||
pip install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt | ||
pip install -e . |
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 |
---|---|---|
|
@@ -26,10 +26,16 @@ jobs: | |
common: | ||
name: Create common environment | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-key: ${{ steps.cache-key.outputs.key }} | ||
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: Generate cache-key | ||
id: cache-key | ||
run: echo key="${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }}" >> $GITHUB_OUTPUT | ||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
|
@@ -39,7 +45,7 @@ jobs: | |
with: | ||
path: venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-${{ env.DEFAULT_PYTHON }}-venv-${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }} | ||
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ steps.cache-key.outputs.key }} | ||
- name: Create Python virtual environment | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
run: | | ||
|
@@ -66,12 +72,11 @@ jobs: | |
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: Restore Python virtual environment | ||
uses: actions/cache/restore@v3.3.1 | ||
- name: Restore Python | ||
uses: ./.github/actions/restore-python | ||
with: | ||
path: venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-${{ env.DEFAULT_PYTHON }}-venv-${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }} | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache-key: ${{ needs.common.outputs.cache-key }} | ||
- name: Run black | ||
run: | | ||
. venv/bin/activate | ||
|
@@ -88,12 +93,11 @@ jobs: | |
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: Restore Python virtual environment | ||
uses: actions/cache/restore@v3.3.1 | ||
- name: Restore Python | ||
uses: ./.github/actions/restore-python | ||
with: | ||
path: venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-${{ env.DEFAULT_PYTHON }}-venv-${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }} | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache-key: ${{ needs.common.outputs.cache-key }} | ||
- name: Run flake8 | ||
run: | | ||
. venv/bin/activate | ||
|
@@ -110,12 +114,11 @@ jobs: | |
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: Restore Python virtual environment | ||
uses: actions/cache/restore@v3.3.1 | ||
- name: Restore Python | ||
uses: ./.github/actions/restore-python | ||
with: | ||
path: venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-${{ env.DEFAULT_PYTHON }}-venv-${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }} | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache-key: ${{ needs.common.outputs.cache-key }} | ||
- name: Run pylint | ||
run: | | ||
. venv/bin/activate | ||
|
@@ -132,12 +135,11 @@ jobs: | |
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: Restore Python virtual environment | ||
uses: actions/cache/restore@v3.3.1 | ||
- name: Restore Python | ||
uses: ./.github/actions/restore-python | ||
with: | ||
path: venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-${{ env.DEFAULT_PYTHON }}-venv-${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }} | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache-key: ${{ needs.common.outputs.cache-key }} | ||
- name: Run pyupgrade | ||
run: | | ||
. venv/bin/activate | ||
|
@@ -154,12 +156,11 @@ jobs: | |
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: Restore Python virtual environment | ||
uses: actions/cache/restore@v3.3.1 | ||
- name: Restore Python | ||
uses: ./.github/actions/restore-python | ||
with: | ||
path: venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-${{ env.DEFAULT_PYTHON }}-venv-${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }} | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache-key: ${{ needs.common.outputs.cache-key }} | ||
- name: Register matcher | ||
run: echo "::add-matcher::.github/workflows/matchers/ci-custom.json" | ||
- name: Run script/ci-custom | ||
|
@@ -176,12 +177,11 @@ jobs: | |
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: Restore Python virtual environment | ||
uses: actions/cache/restore@v3.3.1 | ||
- name: Restore Python | ||
uses: ./.github/actions/restore-python | ||
with: | ||
path: venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-${{ env.DEFAULT_PYTHON }}-venv-${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }} | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache-key: ${{ needs.common.outputs.cache-key }} | ||
- name: Register matcher | ||
run: echo "::add-matcher::.github/workflows/matchers/pytest.json" | ||
- name: Run pytest | ||
|
@@ -197,12 +197,11 @@ jobs: | |
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: Restore Python virtual environment | ||
uses: actions/cache/restore@v3.3.1 | ||
- name: Restore Python | ||
uses: ./.github/actions/restore-python | ||
with: | ||
path: venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-${{ env.DEFAULT_PYTHON }}-venv-${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }} | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache-key: ${{ needs.common.outputs.cache-key }} | ||
- name: Install clang-format | ||
run: | | ||
. venv/bin/activate | ||
|
@@ -237,18 +236,11 @@ jobs: | |
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: Restore Python virtual environment | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-${{ env.DEFAULT_PYTHON }}-venv-${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }} | ||
- name: Cache platformio | ||
uses: actions/[email protected] | ||
- name: Restore Python | ||
uses: ./.github/actions/restore-python | ||
with: | ||
path: ~/.platformio | ||
# yamllint disable-line rule:line-length | ||
key: platformio-test${{ matrix.file }}-${{ hashFiles('platformio.ini') }} | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache-key: ${{ needs.common.outputs.cache-key }} | ||
- name: Run esphome compile tests/test${{ matrix.file }}.yaml | ||
run: | | ||
. venv/bin/activate | ||
|
@@ -300,13 +292,11 @@ jobs: | |
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: Restore Python virtual environment | ||
uses: actions/cache/restore@v3.3.1 | ||
- name: Restore Python | ||
uses: ./.github/actions/restore-python | ||
with: | ||
path: venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-${{ env.DEFAULT_PYTHON }}-venv-${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }} | ||
# Use per check platformio cache because checks use different parts | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache-key: ${{ needs.common.outputs.cache-key }} | ||
- name: Cache platformio | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -315,7 +305,7 @@ jobs: | |
key: platformio-${{ matrix.pio_cache_key }}-${{ hashFiles('platformio.ini') }} | ||
|
||
- name: Install clang-tidy | ||
run: sudo apt-get install clang-tidy-11 | ||
run: sudo apt-get install clang-tidy-14 | ||
|
||
- name: Register problem matchers | ||
run: | | ||
|
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
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 |
---|---|---|
|
@@ -129,4 +129,6 @@ tests/.esphome/ | |
sdkconfig.* | ||
!sdkconfig.defaults | ||
|
||
.tests/ | ||
.tests/ | ||
|
||
/components |
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
Oops, something went wrong.