ci: add build workflow for every commit (syntax check + logic tests)
Build / Lint & Test (push) Successful in 2m12s
Build / Lint & Test (push) Successful in 2m12s
This commit is contained in:
1 parent
d70a931591
commit
303c3b9fd3
1 file changed
+41
@@ -0,0 +1,41 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**' # every branch
|
||||
tags-ignore:
|
||||
- 'v*' # skip tag pushes (handled by release.yml)
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Lint & Test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
# Syntax-check every plugin index.js with Node's parser (no install needed)
|
||||
- name: Syntax check all plugins
|
||||
run: |
|
||||
echo "=== Checking plugin syntax ==="
|
||||
ERRORS=0
|
||||
for f in LocalFlowPlugins/*/*/1.0.0/index.js FlowHelpers/1.0.0/*.js; do
|
||||
node --check "$f" \
|
||||
&& echo " ✓ $f" \
|
||||
|| { echo " ✗ SYNTAX ERROR: $f"; ERRORS=$((ERRORS+1)); }
|
||||
done
|
||||
[[ $ERRORS -eq 0 ]] || { echo ""; echo "❌ $ERRORS file(s) failed syntax check."; exit 1; }
|
||||
echo ""
|
||||
echo "✅ All files passed syntax check."
|
||||
|
||||
# Run the logic test suite (no FFmpeg needed)
|
||||
- name: Run logic tests
|
||||
run: node tests/quick-logic-test.js
|
||||
Reference in new issue
Block a user