Skip to content

Refactor lawndon-pi build and deployment #1

Refactor lawndon-pi build and deployment

Refactor lawndon-pi build and deployment #1

Workflow file for this run

name: Build Tests
on:
pull_request:
branches:
- main
schedule:
- cron: "0 4 * * 4"
jobs:
build-lawndon-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Arduino cli
uses: arduino/setup-arduino-cli@v2
- name: Install libraries
run: |
arduino-cli lib install IBusBM Servo
- name: Lint project
uses: arduino/arduino-lint-action@v2
with:
path: ./lawndon
library-manager: update
- name: Compile Lawndon
uses: arduino/compile-sketches@v1
with:
fqbn: "arduino:avr:mega"
libraries: |
- name: IBusBM
- name: Servo
sketch-paths: |
- ./lawndon
enable-warnings-report: true
verbose: false
cli-compile-flags: |
- --export-binaries
build-lawndon-pi-test:
runs-on: ubuntu-latest
env:
WORKING_DIR: ./pi
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies for UI
working-directory: ${{ env.WORKING_DIR }}
run: |
pnpm install:ui
- name: Build UI
working-directory: ${{ env.WORKING_DIR }}
run: |
pnpm build:ui
- name: Install dependencies for Server
working-directory: ${{ env.WORKING_DIR }}
run: |
pnpm install:server
- name: Build Server
working-directory: ${{ env.WORKING_DIR }}
run: |
pnpm build:server
- name: Test Docker build for Server
working-directory: ${{ env.WORKING_DIR }}
run: |
docker build --no-cache --file ./Dockerfile.server --tag lawndon-pi-server-test .
- name: Test Docker build for UI
working-directory: ${{ env.WORKING_DIR }}
run: |
docker build --no-cache --file ./Dockerfile.ui --tag lawndon-pi-ui-test .