Skip to content

Commit

Permalink
add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mrk-its committed Dec 1, 2024
1 parent 9db3075 commit bd846ce
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Test"

on: [push, pull_request]

jobs:
build:
name: ${{ matrix.board }} ${{ matrix.framework_opts }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 2
matrix:
framework_opts:
- "type=esp-idf version=recommended platform_version=5.4.0"
- "type=arduino version=recommended platform_version=5.4.0"
board:
- esp32-c3-devkitm-1
- wt32-eth01
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure
run: ${{matrix.framework_opts}} board=${{matrix.board}} envsubst < test/config.yaml.template > test/config.yaml
- name: Compile
uses: esphome/[email protected]
id: esphome-build
with:
yaml-file: test/config.yaml
7 changes: 7 additions & 0 deletions docker_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set -x
#FRAMEWORK_OPTS="-s type arduino -s version recommended -s platform_version 5.4.0"
#FRAMEWORK_OPTS="-s type esp-idf -s version 5.2.1 -s platform_version 6.7.0"
FRAMEWORK_OPTS="-s type esp-idf -s version recommended -s platform_version 5.4.0"
BOARD="-s board esp32-c3-devkitm-1"
docker run --mount type=bind,source=$(pwd),target=/config -it esphome/esphome $FRAMEWORK_OPTS $BOARD compile test/config.yaml.template

5 changes: 5 additions & 0 deletions test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Gitignore settings for ESPHome
# This is an example and may include too much for your use-case.
# You can modify this file to suit your needs.
/.esphome/
/secrets.yaml
28 changes: 28 additions & 0 deletions test/config.yaml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
external_components:
- source: ../components

esp32:
framework:
type: ${type}
version: ${version}
platform_version: ${platform_version}
board: ${board}

logger:
level: VERBOSE

esphome:
name: "test-node"

wifi:
power_save_mode: none
networks:
- ssid: ssid
password: password

api:

canbus:
platform: canbus_udp_multicast
id: can_bus
can_id: 1

0 comments on commit bd846ce

Please sign in to comment.