diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec1fd25d..97267593 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,12 +30,12 @@ jobs: sed -i 's/NO_ENERGY_SPEEDOMETER_USER/ENERGY_SPEEDOMETER_USER=\\"${{secrets.ENERGY_SPEEDOMETER_USER}}\\"/g' platformio.ini sed -i 's/NO_ENERGY_SPEEDOMETER_PASS/ENERGY_SPEEDOMETER_PASS=\\"${{secrets.ENERGY_SPEEDOMETER_PASS}}\\"/g' platformio.ini - name: Cache Python dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('platformio.ini') }} - name: Cache PlatformIO dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.pio/libdeps key: ${{ runner.os }}-pio-${{ hashFiles('platformio.ini') }} @@ -50,7 +50,7 @@ jobs: - name: Set up node uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: '22.x' - name: Build with node run: | cd lib/SvelteUi/app diff --git a/.github/workflows/x-test-esp8266.yml b/.github/workflows/x-test-esp8266.yml deleted file mode 100644 index 754d5763..00000000 --- a/.github/workflows/x-test-esp8266.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Test ESP8266 - -on: - workflow_dispatch: - -jobs: - esp8266: - runs-on: esp8266 - steps: - - uses: actions/checkout@v4 - - name: Get commit hash - id: vars - run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - - name: Check outputs - run: echo ${{ steps.vars.outputs.sha_short }} - - name: Inject secrets into ini file - run: | - sed -i 's/NO_AMS2MQTT_PRICE_KEY/AMS2MQTT_PRICE_KEY="${{secrets.AMS2MQTT_PRICE_KEY}}"/g' platformio.ini - sed -i 's/NO_AMS2MQTT_PRICE_AUTHENTICATION/AMS2MQTT_PRICE_AUTHENTICATION="${{secrets.AMS2MQTT_PRICE_AUTHENTICATION}}"/g' platformio.ini - sed -i 's/NO_ENERGY_SPEEDOMETER_USER/ENERGY_SPEEDOMETER_USER=\\"${{secrets.ENERGY_SPEEDOMETER_USER}}\\"/g' platformio.ini - sed -i 's/NO_ENERGY_SPEEDOMETER_PASS/ENERGY_SPEEDOMETER_PASS=\\"${{secrets.ENERGY_SPEEDOMETER_PASS}}\\"/g' platformio.ini - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio css_html_js_minify - - name: Set up node - uses: actions/setup-node@v4 - with: - node-version: '16.x' - - name: Configure PlatformIO environment - run: | - echo "[platformio] - default_envs = dev8266 - - [env:dev8266] - platform = espressif8266@4.2.0 - framework = arduino - board = esp12e - board_build.ldscript = eagle.flash.4m2m.ld - build_flags = \${common.build_flags} - lib_ldf_mode = off - lib_compat_mode = off - lib_deps = ESP8266WiFi, ESP8266mDNS, ESP8266WebServer, ESP8266HTTPClient, ESP8266httpUpdate, ESP8266SSDP, \${common.lib_deps} - lib_ignore = \${common.lib_ignore} - extra_scripts = \${common.extra_scripts}" > platformio-user.ini - - name: Build with node - run: | - cd lib/SvelteUi/app - npm ci - npm run build - cd - - env: - CI: true - - name: PlatformIO lib install - run: pio pkg update - - name: PlatformIO run - run: pio run -t upload --upload-port /dev/ttyUSB0 - - name: Wait for device to come online - run: waitforhost 10.42.0.11 80 - - name: Confirm version - run: curl -s http://10.42.0.11/sysinfo.json|jq -r .version | grep "${{ steps.vars.outputs.sha_short }}" || exit 1 - - name: Running amsreader-test - run: amsreader-test 10.42.0.11