Updated packages and added new test-build action #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/test-build.yml | |
name: Test Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test-build: | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/actions/checkout | |
- uses: actions/checkout@v4 | |
# a standard step for GitHub actions on Node | |
# https://github.com/actions/setup-node | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: yarn | |
cache-dependency-path: ./editor-app/yarn.lock | |
- name: Install dependencies | |
working-directory: ./editor-app | |
run: yarn install --frozen-lockfile | |
- name: Run linting | |
working-directory: ./editor-app | |
run: yarn lint | |
continue-on-error: true | |
- name: Run security audit | |
working-directory: ./editor-app | |
run: yarn audit --level moderate | |
continue-on-error: true # Don't fail deployment on audit issues | |
- name: Test build | |
working-directory: ./editor-app | |
run: | | |
yarn build | |
echo "✅ Build successful" | |
- name: Check build output | |
working-directory: ./editor-app | |
run: | | |
if [ ! -d "out" ]; then | |
echo "❌ Build output directory 'out' not found" | |
exit 1 | |
fi | |
if [ ! -f "out/index.html" ]; then | |
echo "❌ index.html not found in build output" | |
exit 1 | |
fi | |
echo "✅ Build output verified" |