👽 Configures frontend tests suit
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
name: Embedded app build size
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- 'app/**'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- 'app/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 'latest'
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: './app/pnpm-lock.yaml'
|
||||
|
||||
- name: Install dependencies
|
||||
run: cd app && pnpm install
|
||||
- name: Build app
|
||||
run: cd app && pnpm build
|
||||
- name: List files
|
||||
run: cd esp32 && ls
|
||||
|
||||
|
||||
- name: Check index.html size
|
||||
run: |
|
||||
SIZE=$(stat --format=%s esp32/data/index.html.gz)
|
||||
MAXSIZE=204800
|
||||
if [ $SIZE -gt $MAXSIZE ]; then
|
||||
echo "index.html is larger than 200KB ($SIZE bytes)"
|
||||
exit 1
|
||||
else
|
||||
echo "index.html size is within limit ($SIZE bytes)"
|
||||
fi
|
||||
@@ -34,6 +34,8 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Install Playwright Browsers
|
||||
run: npx playwright install --with-deps
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm test
|
||||
@@ -1,34 +0,0 @@
|
||||
name: PlatformIO Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- 'esp32/**'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- 'esp32/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
DEVICE: esp32cam
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./esp32
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install PlatformIO
|
||||
run: pip install platformio
|
||||
- name: Build using PlatformIO
|
||||
run: pio run -e $DEVICE
|
||||
Reference in New Issue
Block a user