mealie/.github/workflows/test-frontend.yml
Brian Choromanski 9c3b94c019
dev: Bumped gh actions to support node 24 (#7392)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
2026-04-04 14:13:09 +00:00

54 lines
1.3 KiB
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 }}
- name: Setup node env 🏗
uses: actions/setup-node@v6
with:
node-version: 22
check-latest: true
- name: Get yarn cache directory path 🛠
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache node_modules 📦
uses: actions/cache@v5
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies 👨🏻‍💻
run: yarn
working-directory: "frontend"
- name: Prepare nuxt 🚀
run: yarn nuxt prepare
working-directory: "frontend"
- name: Run linter 👀
run: yarn lint --max-warnings=0
working-directory: "frontend"
- name: Run tests 🧪
run: yarn test:ci
working-directory: "frontend"