3x-ui/.github/workflows/ci.yml
MHSanaei 234cce408b
@
ci: replace legacy frontend path filters with frontend/** glob

The CI, CodeQL, and release workflows still gated on a per-extension
list (**.js, **.html, **.css, **.cjs, ...) left over from the old
Vue/JS UI. That list missed .tsx entirely, so React component edits
never triggered the workflows, and carried dead entries like **.cjs.
Replace the whole enumeration with a single frontend/** glob in all
three so any change under frontend/ triggers build/test/analysis,
while keeping **.go, go.mod, go.sum, **.sh, and the service-file paths.
@
2026-05-31 01:18:59 +02:00

81 lines
1.9 KiB
YAML

name: CI
on:
pull_request:
paths:
- "**.go"
- "go.mod"
- "go.sum"
- "frontend/**"
- ".nvmrc"
push:
branches:
- main
paths:
- "**.go"
- "go.mod"
- "go.sum"
- "frontend/**"
- ".nvmrc"
permissions:
contents: read
jobs:
go-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Stub web/dist for go:embed
run: mkdir -p web/dist && touch web/dist/.gitkeep
- name: Test
run: |
go list ./... | grep -v '/frontend/node_modules/' > /tmp/go-packages.txt
go test $(cat /tmp/go-packages.txt)
govulncheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Stub web/dist for go:embed
run: mkdir -p web/dist && touch web/dist/.gitkeep
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck
run: govulncheck ./...
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install
run: npm ci
working-directory: frontend
- name: Lint
run: npm run lint
working-directory: frontend
- name: Typecheck
run: npm run typecheck
working-directory: frontend
- name: Test
run: npm test
working-directory: frontend
- name: Build
run: npm run build
working-directory: frontend
- name: Audit
run: npm audit --audit-level=high
working-directory: frontend