Files
pezkuwi-telemetry/.github/workflows/frontend-ci.yml
T
SatoshiQaziMuhammed fd87b1cce2 ci: read-only GITHUB_TOKEN for backend and frontend CI (#13)
CodeQL actions/missing-workflow-permissions #1-#3: neither workflow writes through GITHUB_TOKEN (checkout, toolchain, cache, upload-artifact).
2026-10-21 13:39:02 +04:00

59 lines
1.2 KiB
YAML

name: Frontend CI
on:
push:
branches: [main, master]
paths:
- 'frontend/**'
- '.github/workflows/frontend-ci.yml'
pull_request:
branches: [main, master]
paths:
- 'frontend/**'
- '.github/workflows/frontend-ci.yml'
workflow_dispatch:
# Read-only token: no step writes through GITHUB_TOKEN.
permissions:
contents: read
jobs:
lint-and-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Prettier check
run: npm run pretty:check
- name: Run tests
run: npm run test -- --passWithNoTests
- name: Build
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: frontend-build
path: frontend/build/
retention-days: 7