mirror of
https://github.com/esphome/esphome.git
synced 2025-01-18 10:25:56 +01:00
Validate test files before compiling (#5611)
* Validate test files before compiling * Dont restrict parallel
This commit is contained in:
parent
a9f4922824
commit
2adda3a994
1 changed files with 24 additions and 0 deletions
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
|
@ -221,6 +221,29 @@ jobs:
|
||||||
id: set-matrix
|
id: set-matrix
|
||||||
run: echo "matrix=$(ls tests/test*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
|
run: echo "matrix=$(ls tests/test*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
validate-tests:
|
||||||
|
name: Validate YAML test ${{ matrix.file }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- common
|
||||||
|
- compile-tests-list
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
file: ${{ fromJson(needs.compile-tests-list.outputs.matrix) }}
|
||||||
|
steps:
|
||||||
|
- name: Check out code from GitHub
|
||||||
|
uses: actions/checkout@v4.1.1
|
||||||
|
- name: Restore Python
|
||||||
|
uses: ./.github/actions/restore-python
|
||||||
|
with:
|
||||||
|
python-version: ${{ env.DEFAULT_PYTHON }}
|
||||||
|
cache-key: ${{ needs.common.outputs.cache-key }}
|
||||||
|
- name: Run esphome config ${{ matrix.file }}
|
||||||
|
run: |
|
||||||
|
. venv/bin/activate
|
||||||
|
esphome config ${{ matrix.file }}
|
||||||
|
|
||||||
compile-tests:
|
compile-tests:
|
||||||
name: Run YAML test ${{ matrix.file }}
|
name: Run YAML test ${{ matrix.file }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -234,6 +257,7 @@ jobs:
|
||||||
- pytest
|
- pytest
|
||||||
- pyupgrade
|
- pyupgrade
|
||||||
- compile-tests-list
|
- compile-tests-list
|
||||||
|
- validate-tests
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 2
|
max-parallel: 2
|
||||||
|
|
Loading…
Reference in a new issue