mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-12-01 12:03:26 +01:00
39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
name: Semi frontend
|
|
|
|
on:
|
|
push:
|
|
paths: ['web/frontend/**', 'web/static/app/**', 'web/static/i18n/**', 'internal/app/app.go', '.github/workflows/frontend-build.yml']
|
|
pull_request:
|
|
paths: ['web/frontend/**', 'web/static/app/**', 'web/static/i18n/**', 'internal/app/app.go', '.github/workflows/frontend-build.yml']
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
frontend:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: npm
|
|
cache-dependency-path: web/frontend/package-lock.json
|
|
- run: npm ci --prefix web/frontend
|
|
- run: npm run --prefix web/frontend build
|
|
- name: Check committed build
|
|
run: |
|
|
changes=$(git status --porcelain -- web/static/app)
|
|
if [ -n "$changes" ]; then
|
|
printf '%s\n' "$changes"
|
|
exit 1
|
|
fi
|
|
- name: Frontend unit tests and built assets
|
|
run: node --test web/frontend/tests/*.test.mjs
|
|
- name: Install Chromium for isolated UI tests
|
|
working-directory: web/frontend
|
|
run: npx playwright install --with-deps chromium
|
|
- name: Browser regression tests
|
|
run: npm run --prefix web/frontend test:ui -- --reporter=line
|