ci: use merge-gatekeeper #22
Workflow file for this run
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 | |
permissions: | |
contents: read | |
on: | |
push: | |
paths: | |
- .github/workflows/frontend.yaml | |
- frontend/** | |
branches: | |
- '**' | |
tags-ignore: | |
- "**" | |
workflow_call: | |
defaults: | |
run: | |
working-directory: frontend | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
cache: 'npm' | |
cache-dependency-path: frontend/package-lock.json | |
- run: npm install | |
- run: npm run build | |
check-generated-files: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
cache: 'npm' | |
cache-dependency-path: frontend/package-lock.json | |
- run: npm install | |
- run: npm run generate-api | |
- run: git add -N . | |
- run: git diff . | |
# exits with exitcode != 0 if changes are detected | |
- run: git diff --quiet . | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
cache: 'npm' | |
cache-dependency-path: frontend/package-lock.json | |
- run: npm install | |
- run: npm run lint | |
- run: npm run find-unused-resources | |
test: | |
runs-on: ubuntu-latest | |
env: | |
VITE_SERVER_URL: http://localhost:5173/api-proxy | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
cache: 'npm' | |
cache-dependency-path: frontend/package-lock.json | |
- run: npm install | |
- run: npm test |