- ci: make frontend CI read-only with strict diff check and deterministic calls.json - ci: pin external GitHub Actions in workflows to immutable commit SHAs - ci: add openwrt-e2e blocking gate job running docker_e2e_test.sh - fix(diagnostic): fix contstants.ts typo and update all 13 import sites - fix(acl): remove unused /bin/busybox exec from rpcd ACL and add regression test - feat(updates): add low-space update fallback when creating sing-box.old is impossible - fix(routes): preserve dedicated Discord gateway subnets (162.159.128.0/21) - feat(ui): implement responsive auto-fit grid and mobile modal viewport bounds - test: add viewport regression test suite in vitest
94 lines
2.8 KiB
YAML
94 lines
2.8 KiB
YAML
name: Frontend CI
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'fe-app-tachyon/**'
|
|
- 'luci-app-tachyon/po/**'
|
|
- '.github/workflows/frontend-ci.yml'
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'fe-app-tachyon/**'
|
|
- 'luci-app-tachyon/po/**'
|
|
- '.github/workflows/frontend-ci.yml'
|
|
|
|
jobs:
|
|
frontend-checks:
|
|
name: Frontend Quality Checks
|
|
runs-on: ubuntu-24.04
|
|
defaults:
|
|
run:
|
|
working-directory: fe-app-tachyon
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
with:
|
|
node-version: '22'
|
|
cache: npm
|
|
cache-dependency-path: fe-app-tachyon/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Check formatting
|
|
id: format
|
|
run: |
|
|
npm run format
|
|
if ! git diff --exit-code; then
|
|
echo "::error::Code is not formatted. Run 'npm run format' locally."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Run linter
|
|
run: npm run lint -- --max-warnings=0
|
|
|
|
- name: Run tests
|
|
run: npm test -- --run
|
|
|
|
- name: Check translation extraction
|
|
id: locale_extract
|
|
run: |
|
|
npm run locales:extract-calls
|
|
if ! git diff --exit-code -- locales/calls.json; then
|
|
echo "::error::Translation call index is stale. Run 'npm run locales:extract-calls' locally."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Check distributed locales
|
|
id: locale_distribute
|
|
run: |
|
|
npm run locales:distribute
|
|
if ! git diff --exit-code -- ../luci-app-tachyon/po; then
|
|
echo "::error::LuCI locale copies are stale. Run 'npm run locales:distribute' locally."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Build project
|
|
id: build
|
|
run: |
|
|
npm run build
|
|
if ! git diff --exit-code -- ../luci-app-tachyon/htdocs; then
|
|
echo "::error::Build generated changes. Check build output."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Summary
|
|
if: always()
|
|
run: |
|
|
echo "## Frontend CI Results" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "- Format check: ${{ steps.format.outcome }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "- Translation extraction: ${{ steps.locale_extract.outcome }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "- Locale distribution: ${{ steps.locale_distribute.outcome }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "- Overall lint/tests status: ${{ job.status }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "- Build: ${{ steps.build.outcome }}" >> $GITHUB_STEP_SUMMARY
|