Skip to content

chore: Add tools to convert github configuration to local configurati… #391

chore: Add tools to convert github configuration to local configurati…

chore: Add tools to convert github configuration to local configurati… #391

name: ESPHome Compilation
on:
push:
pull_request:
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Install ESPHome
run: |
python -m pip install --upgrade pip
pip install esphome
- name: Create secrets file
run: |
echo "wifi_ssid: \"myWifiSsid\"" > secrets.yaml
echo "wifi_password: \"myWifiPassword\"" >> secrets.yaml
echo "ota_password: \"mySolarRouterOtaPassword\"" >> secrets.yaml
echo "api_encryption_key: \"8q4u9dNBGMcsPemx+Q+WzLTU+mLXHAgPsrTpGjyV1hs=\"" >> secrets.yaml
echo "hotspot_password: \"myHotspotPassword\"" >> secrets.yaml
echo "proxy_api_encryption_key: \"8q4u9dNBGMcsPemx+Q+WzLTU+mLXHAgPsrTpGjyV1hs=\"" >> secrets.yaml
- name: Compile esp32-proxy-client.yaml
continue-on-error: true
run: tools/convert_to_local_source_for_ci.sh esp32-proxy-client.yaml && esphome compile work_in_progress.yaml
id: conf1
- name: Compile wt32-eth01-solar-water-heater.yaml
continue-on-error: true
run: tools/convert_to_local_source_for_ci.sh wt32-eth01-solar-water-heater.yaml && esphome compile work_in_progress.yaml
id: conf2
- name: Compile esp8266-standalone_on_off.yaml
continue-on-error: true
run: tools/convert_to_local_source_for_ci.sh esp8266-standalone_on_off.yaml && esphome compile work_in_progress.yaml
id: conf3
- name: Compile esp8285-power-meter-proxy.yaml
continue-on-error: true
run: tools/convert_to_local_source_for_ci.sh esp8285-power-meter-proxy.yaml && esphome compile work_in_progress.yaml
id: conf4
- name: Check for compile errors
run: |
if [ ${{ steps.conf1.outcome }} == 'failure' ] || [ ${{ steps.conf2.outcome }} == 'failure' || ${{ steps.conf3.outcome }} == 'failure' ] || [ ${{ steps.conf4.outcome }} == 'failure']; then
echo "One or more compilations failed"
exit 1
fi