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
name: Frontend CI | |
on: | |
push: | |
paths: | |
- "frontend/**" | |
pull_request: | |
paths: | |
- "frontend/**" | |
jobs: | |
frontend-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.tool-versions' | |
cache: "npm" | |
cache-dependency-path: frontend/package-lock.json | |
- name: Install dependencies | |
run: | | |
cd frontend | |
npm ci | |
- name: Check code formatting | |
run: | | |
cd frontend | |
npm run format:check | |
- name: Build frontend | |
run: | | |
cd frontend | |
npm run build | |
frontend-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.tool-versions' | |
cache: "npm" | |
cache-dependency-path: frontend/package-lock.json | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version-file: '.tool-versions' | |
bundler-cache: true | |
- name: Install dependencies | |
run: | | |
cd frontend | |
npm ci | |
cd .. | |
bundle install | |
- name: Check for vulnerabilities | |
run: | | |
cd frontend | |
npm audit --audit-level=moderate | |
- name: Run unit tests | |
run: | | |
cd frontend | |
npm run test:unit | |
- name: Run integration tests | |
run: | | |
cd frontend | |
npm run test:integration | |
- name: Build and verify | |
run: | | |
cd frontend | |
npm run build | |
# Verify the built HTML is valid | |
grep -q "html2rss-web" dist/index.html | |
grep -q "Feed Gallery" dist/gallery/index.html |