Merge branch 'btclock:main' into main

This commit is contained in:
Paul Willen 2023-11-30 21:27:05 +01:00 committed by GitHub
commit 5025043411
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 36 deletions

View file

@ -0,0 +1,42 @@
name: "Checkout, install and build"
description: "Checkout, install and build"
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn
cache-dependency-path: '**/yarn.lock'
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
~/data/node_modules
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Get current date
id: dateAndTime
run: echo "dateAndTime=$(date +'%Y-%m-%d-%H:%M')" >> $GITHUB_OUTPUT
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Run unit tests
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
run: pio run -e lolin_s3_mini_qr
- name: Build BTClock filesystem
run: pio run -e lolin_s3_mini_qr --target buildfs

16
.github/workflows/pull_request.yml vendored Normal file
View file

@ -0,0 +1,16 @@
name: Pull Request Workflow
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
steps:
- name: "Checkout, install and build"
uses: ./.github/actions/checkout-install-build

View file

@ -12,42 +12,8 @@ jobs:
contents: write contents: write
checks: write checks: write
steps: steps:
- uses: actions/checkout@v4 - name: "Checkout, install and build"
with: uses: ./.github/actions/checkout-install-build
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn
cache-dependency-path: '**/yarn.lock'
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
~/data/node_modules
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Get current date
id: dateAndTime
# run: echo "::set-output name=dateAndTime::$(date +'%Y-%m-%d-%H:%M')"
run: echo "dateAndTime=$(date +'%Y-%m-%d-%H:%M')" >> $GITHUB_OUTPUT
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Run unit tests
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'
- name: Build BTClock firmware
run: pio run -e lolin_s3_mini_qr
- name: Build BTClock filesystem
run: pio run -e lolin_s3_mini_qr --target buildfs
- name: Install esptools.py - name: Install esptools.py
run: pip install --upgrade esptool run: pip install --upgrade esptool