mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-10-14 08:35:12 +02:00
CI: work on Gitea's runner image too
Install yamllint with pip instead of ibiqlik/action-yamllint, which expects it preinstalled like on GitHub's runner, and pip install with --ignore-installed so pip doesn't try to remove Debian's packages.
This commit is contained in:
1 parent
7374ddf4d6
commit
0536e91fd1
1 file changed
+9
-5
@@ -18,11 +18,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
files: "**/*.yaml"
|
files: "**/*.yaml"
|
||||||
|
|
||||||
- uses: ibiqlik/action-yamllint@v3
|
# yamllint straight from pip: Gitea's runner image doesn't ship it like GitHub's does
|
||||||
|
- name: Lint changed YAML files
|
||||||
if: steps.changed.outputs.any_changed == 'true'
|
if: steps.changed.outputs.any_changed == 'true'
|
||||||
with:
|
env:
|
||||||
config_file: .yamllint.yml
|
PIP_BREAK_SYSTEM_PACKAGES: "1"
|
||||||
file_or_dir: ${{ steps.changed.outputs.all_changed_files }}
|
run: |
|
||||||
|
pip install --ignore-installed yamllint
|
||||||
|
yamllint -c .yamllint.yml -f parsable ${{ steps.changed.outputs.all_changed_files }}
|
||||||
|
|
||||||
validate:
|
validate:
|
||||||
name: ESPHome config validation
|
name: ESPHome config validation
|
||||||
@@ -39,9 +42,10 @@ jobs:
|
|||||||
- name: Install ESPHome (dev)
|
- name: Install ESPHome (dev)
|
||||||
if: steps.changed.outputs.any_changed == 'true'
|
if: steps.changed.outputs.any_changed == 'true'
|
||||||
# Gitea's runner image marks the system Python as externally managed (PEP 668)
|
# Gitea's runner image marks the system Python as externally managed (PEP 668)
|
||||||
|
# and has Debian packages pip can't uninstall (pyparsing), so don't touch them
|
||||||
env:
|
env:
|
||||||
PIP_BREAK_SYSTEM_PACKAGES: "1"
|
PIP_BREAK_SYSTEM_PACKAGES: "1"
|
||||||
run: pip install git+https://github.com/esphome/esphome.git@dev
|
run: pip install --ignore-installed git+https://github.com/esphome/esphome.git@dev
|
||||||
|
|
||||||
- name: Prepare secrets
|
- name: Prepare secrets
|
||||||
if: steps.changed.outputs.any_changed == 'true'
|
if: steps.changed.outputs.any_changed == 'true'
|
||||||
|
|||||||
Reference in new issue
Block a user