-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (44 loc) · 1.67 KB
/
Copy pathvalidate.yml
File metadata and controls
55 lines (44 loc) · 1.67 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
47
48
49
50
51
52
53
54
55
name: Validate
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
validate:
name: validate
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.14"
cache: pip
cache-dependency-path: requirements-dev.txt
- name: Set up Arduino CLI
uses: arduino/setup-arduino-cli@81d310742121c928ea9c8bbd407b4217b432ae02 # v2.0.0
with:
version: "1.5.1"
- name: Install validation dependencies
run: python -m pip install --requirement requirements-dev.txt
- name: Verify nRF52 packaging tool
run: adafruit-nrfutil version
- name: Install locked Arduino platform
run: |
arduino-cli core update-index
arduino-cli core install arduino:avr@1.8.8
arduino-cli core install Seeeduino:nrf52@1.1.13 --additional-urls https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
- name: Run unit tests
run: python -m unittest -v tests.test_firmware
- name: Reject human changes to generated board data
if: github.event_name == 'pull_request'
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: python scripts/firmware.py --root . validate-pr --base "$BASE_SHA"
- name: Compile every board twice
run: python scripts/firmware.py --root . compile --arduino-cli arduino-cli