-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
504 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: Update Tags | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
update-tags: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@main | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
- name: Move and push stable tag | ||
run: | | ||
git tag -f stable ${{ github.event.release.tag_name }} | ||
git push -f origin stable | ||
- name: Move and push latest tag | ||
run: | | ||
git tag -f latest ${{ github.event.release.tag_name }} | ||
git push -f origin latest | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
name: Validate C++ (Clang Format) | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
paths: | ||
- '**/*.h' | ||
- '**/*.c' | ||
- '**/*.cpp' | ||
pull_request: | ||
paths: | ||
- '**/*.h' | ||
- '**/*.c' | ||
- '**/*.cpp' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
clang-format-checking: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@main | ||
- uses: RafikFarhad/clang-format-github-action@v3 | ||
with: | ||
sources: "components/tx_ultimate_easy/*.h,components/tx_ultimate_easy/*.cpp" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
--- | ||
name: Validate and Build ESPHome | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
paths: | ||
- "*.yaml" | ||
- "prebuilt/*.yaml" | ||
- ".test/*.yaml" | ||
- "*.h" | ||
- "*.c" | ||
- "*.cpp" | ||
- "*.py" | ||
pull_request: | ||
paths: | ||
- "*.yaml" | ||
- "prebuilt/*.yaml" | ||
- ".test/*.yaml" | ||
- "*.h" | ||
- "*.c" | ||
- "*.cpp" | ||
- "*.py" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
setup_dependencies: | ||
name: Setup & Cache Dependencies | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-hit-arduino: ${{ steps.cache-arduino.outputs.cache-hit }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@main | ||
|
||
- name: Cache Arduino Dependencies | ||
id: cache-arduino | ||
uses: actions/cache@main | ||
with: | ||
path: | | ||
~/.esphome/cache | ||
~/.platformio/packages | ||
~/.platformio/platforms | ||
key: ${{ runner.os }}-arduino-${{ hashFiles('**/esphome_ard_basic.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-arduino- | ||
code_scan: | ||
name: Code scan (YAML) | ||
runs-on: "ubuntu-latest" | ||
needs: setup_dependencies | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@main | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@main | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install Yamllint | ||
run: pip install yamllint | ||
|
||
- name: Validate YAML files | ||
run: find . -name "*.yaml" -exec yamllint -c ./.rules/yamllint.yml {} + | ||
|
||
build_basic: | ||
name: Basic | ||
needs: [code_scan, setup_dependencies] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- id: ard | ||
yaml_file: ".test/esphome_ard_basic.yaml" | ||
cache-hit: ${{ needs.setup_dependencies.outputs.cache-hit-arduino }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@main | ||
|
||
- name: Firmware | ||
if: steps.matrix.outputs.cache-hit != 'true' | ||
uses: barndawgie/build-action@v1.9.0 | ||
with: | ||
yaml_file: ${{ matrix.yaml_file }} | ||
|
||
build_bluetooth_proxy: | ||
name: Bluetooth Proxy | ||
needs: build_basic | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- id: idf_v4 | ||
base: idf_v4 | ||
yaml_file: ".test/esphome_idf_bluetooth_proxy.yaml" | ||
- id: idf_v5 | ||
base: idf_v5 | ||
yaml_file: ".test/esphome_idf5_bluetooth_proxy.yaml" | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@main | ||
|
||
- name: Build Bluetooth Proxy Firmware | ||
uses: barndawgie/build-action@v1.9.0 | ||
with: | ||
yaml_file: ${{ matrix.yaml_file }} | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
--- | ||
name: Validate ESPHome (Beta) | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
setup_dependencies: | ||
name: Setup & Cache Dependencies | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-hit-arduino: ${{ steps.cache-arduino.outputs.cache-hit }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@main | ||
|
||
- name: Cache Arduino Dependencies | ||
id: cache-arduino | ||
uses: actions/cache@main | ||
with: | ||
path: | | ||
~/.esphome/cache | ||
~/.platformio/packages | ||
~/.platformio/platforms | ||
key: ${{ runner.os }}-arduino-${{ hashFiles('**/esphome_ard_basic.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-arduino- | ||
code_scan: | ||
name: Code scan (YAML) | ||
runs-on: "ubuntu-latest" | ||
needs: setup_dependencies | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@main | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@main | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install Yamllint | ||
run: pip install yamllint | ||
|
||
- name: Validate YAML files | ||
run: find . -name "*.yaml" -exec yamllint -c ./.rules/yamllint.yml {} + | ||
|
||
build_basic: | ||
name: Basic | ||
needs: [code_scan, setup_dependencies] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- id: ard | ||
yaml_file: ".test/esphome_ard_basic.yaml" | ||
cache-hit: ${{ needs.setup_dependencies.outputs.cache-hit-arduino }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@main | ||
|
||
- name: Firmware | ||
if: steps.matrix.outputs.cache-hit != 'true' | ||
uses: barndawgie/build-action@v1.9.0 | ||
with: | ||
yaml_file: ${{ matrix.yaml_file }} | ||
version: beta | ||
|
||
build_bluetooth_proxy: | ||
name: Bluetooth Proxy | ||
needs: build_basic | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- id: idf_v4 | ||
base: idf_v4 | ||
yaml_file: ".test/esphome_idf_bluetooth_proxy.yaml" | ||
- id: idf_v5 | ||
base: idf_v5 | ||
yaml_file: ".test/esphome_idf5_bluetooth_proxy.yaml" | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@main | ||
|
||
- name: Build Bluetooth Proxy Firmware | ||
uses: barndawgie/build-action@v1.9.0 | ||
with: | ||
yaml_file: ${{ matrix.yaml_file }} | ||
version: beta | ||
... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
name: Validate Markdown | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
paths: | ||
- '**/*.md' | ||
push: | ||
paths: | ||
- '**/*.md' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
markdown-lint: | ||
name: Markdown Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@main | ||
with: | ||
fetch-depth: '0' | ||
|
||
# https://github.com/marketplace/actions/markdownlint-cli2-action | ||
- name: Identify changed files | ||
uses: tj-actions/changed-files@v41 | ||
id: changed-files | ||
with: | ||
files: '**/*.md' | ||
separator: "," | ||
# https://github.com/marketplace/actions/markdownlint-cli2-action | ||
- name: Markdown Lint | ||
uses: DavidAnson/markdownlint-cli2-action@v14 | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
globs: ${{ steps.changed-files.outputs.all_changed_files }} | ||
separator: "," | ||
config: '.rules/.markdownlint.jsonc' | ||
fix: true | ||
|
||
markdown-links: | ||
name: Check links | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@main | ||
with: | ||
fetch-depth: '0' | ||
|
||
# https://github.com/gaurav-nelson/github-action-markdown-link-check | ||
- name: Markdown links | ||
uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
with: | ||
# yamllint disable-line rule:truthy | ||
check-modified-files-only: yes | ||
config-file: '.rules/mlc_config.json' | ||
base-branch: 'main' | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: Validate Python (flake8) | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
paths: | ||
- '*.py' | ||
pull_request: | ||
paths: | ||
- '*.py' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
flake8-lint: | ||
runs-on: ubuntu-latest | ||
name: Lint | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@main | ||
- name: Set up Python environment | ||
uses: actions/setup-python@main | ||
with: | ||
python-version: "3.11" | ||
- name: flake8 Lint | ||
uses: py-actions/flake8@v2 | ||
with: | ||
max-line-length: "200" | ||
path: "components/tx_ultimate_easy" | ||
... |
Oops, something went wrong.