46 lines
995 B
YAML
46 lines
995 B
YAML
name: Frontend Lint and Test
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
ref:
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout 🛎
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: ${{ inputs.ref || github.sha }}
|
|
|
|
- uses: pnpm/action-setup@v6
|
|
with:
|
|
version: 11
|
|
|
|
- name: Setup node env 🏗
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
cache: "pnpm"
|
|
cache-dependency-path: "**/pnpm-lock.yaml"
|
|
|
|
- name: Install dependencies 👨🏻💻
|
|
run: pnpm install --prefer-offline
|
|
working-directory: "frontend"
|
|
|
|
- name: Prepare nuxt 🚀
|
|
run: pnpm nuxt prepare
|
|
working-directory: "frontend"
|
|
|
|
- name: Run linter 👀
|
|
run: pnpm lint --max-warnings=0
|
|
working-directory: "frontend"
|
|
|
|
- name: Run tests 🧪
|
|
run: pnpm test:ci
|
|
working-directory: "frontend"
|