-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.32 KB
/
Copy pathci.yml
File metadata and controls
46 lines (42 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
# A newer push to the same branch makes an in-flight run redundant.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.11'
# The key varies with platformio.ini, so a platform change is cached
# instead of being downloaded again on every run.
- uses: actions/cache@v6
with:
path: |
~/.cache/pip
~/.platformio/.cache
~/.platformio/packages
~/.platformio/platforms
key: ${{ runner.os }}-pio-${{ hashFiles('platformio.ini') }}
restore-keys: |
${{ runner.os }}-pio-
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Run unit tests
run: pio test -e native
- name: Run static analysis
run: pio check -e nodemcuv2 --fail-on-defect=high
# Builds the example the way a user would get it: the library on its own,
# with none of this repo's dev files.
- name: Build the Basic example
run: pio ci --lib=. --board=nodemcuv2 examples/Basic/Basic.ino