39 lines
851 B
YAML
39 lines
851 B
YAML
name: Frontend CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
paths:
|
|
- 'frontend/**'
|
|
- '.github/workflows/frontend.yml'
|
|
pull_request:
|
|
branches: [ main, develop ]
|
|
paths:
|
|
- 'frontend/**'
|
|
- '.github/workflows/frontend.yml'
|
|
|
|
jobs:
|
|
frontend-test:
|
|
runs-on: [docker]
|
|
|
|
# Note: Using the container here ensures the cache volume works reliably
|
|
container:
|
|
image: nikolaik/python-nodejs:python3.12-nodejs24-alpine
|
|
options: --volume forgejo-npm-cache:/tmp/npm-cache
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Configure NPM cache
|
|
run: npm config set cache /tmp/npm-cache --global
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cd frontend
|
|
npm config get cache
|
|
npm ci
|
|
|
|
- name: Lint
|
|
run: |
|
|
cd frontend
|
|
npm run lint
|