mirror of
https://github.com/btclock/btclock_v3.git
synced 2024-11-19 05:20:01 +01:00
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
name: "Install and build"
|
|
description: "Install and build"
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
cache: yarn
|
|
cache-dependency-path: '**/yarn.lock'
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cache/pip
|
|
~/.platformio/.cache
|
|
~/data/node_modules
|
|
key: ${{ runner.os }}-pio
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.9'
|
|
- name: Get current date
|
|
id: dateAndTime
|
|
shell: bash
|
|
run: echo "dateAndTime=$(date +'%Y-%m-%d-%H:%M')" >> $GITHUB_OUTPUT
|
|
- name: Install PlatformIO Core
|
|
shell: bash
|
|
run: pip install --upgrade platformio
|
|
- name: Run unit tests
|
|
shell: bash
|
|
run: mkdir -p junit-reports && pio test -e native_test_only --junit-output-path junit-reports/
|
|
- name: Publish Test Report
|
|
uses: mikepenz/action-junit-report@v4
|
|
if: success() || failure() # always run even if the previous step fails
|
|
with:
|
|
report_paths: '**/junit-reports/*.xml'
|
|
detailed_summary: true
|
|
- name: Build BTClock firmware
|
|
shell: bash
|
|
run: pio run
|
|
- name: Build BTClock filesystem
|
|
shell: bash
|
|
run: pio run --target buildfs |