-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add platform io test workflow running the native unit tests
- Loading branch information
Showing
1 changed file
with
51 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,51 @@ | ||
# This workflow builds all platformio build targets to test whether any of them were broken by a commit. | ||
|
||
name: Platform IO test | ||
|
||
on: | ||
push: | ||
paths: | ||
- test/** | ||
- lib/** | ||
- shared/** | ||
- platformio.ini | ||
- .github/workflows/pio_test.yml | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
name: Platform IO test (${{ matrix.os }}) | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Cache pip packages and Platform IO build cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/pip | ||
~/.platformio | ||
.pio | ||
key: platformio-${{ hashFiles('platformio.ini') }}-${{ matrix.os }} | ||
|
||
- name: Install Platform IO | ||
run: pip install -U platformio | ||
|
||
- name: Platform IO test | ||
run: pio test -e native |