Restaurant Speisekarte

Docs & Code reference

CI - Code Quality (GitHub Actions)

This document explains the ci.yml workflow located at .github/workflows/ci.yml.

Purpose

Triggers

Jobs

Workflow (excerpt)

name: CI - Code Quality

on:
  push:
    branches: [ main, master ]
    paths:
      - 'src/**'
      - 'pages/**'
      - 'public/**'
      - 'styles/**'
      - 'package.json'
      - 'package-lock.json'
      - 'next.config.mjs'
  pull_request:
    branches: [ main, master ]
    paths:
      - 'src/**'
      - 'pages/**'
      - 'public/**'
      - 'styles/**'
      - 'package.json'
      - 'package-lock.json'
      - 'next.config.mjs'

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-node@v4
      with:
        node-version: '18'
        cache: 'npm'
    - run: npm ci
    - run: npm run lint
    - run: npm run build
    - run: npm test --if-present

Notes