mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-09-08 05:26:00 +00:00
58 lines
1.2 KiB
YAML
58 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
quality:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
|
|
- name: Cache Next.js build
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ github.workspace }}/.next/cache
|
|
key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}-${{ hashFiles('src/**/*.ts', 'src/**/*.tsx', 'src/**/*.css', 'next.config.ts') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Generate Next.js types
|
|
run: pnpm exec next typegen
|
|
|
|
- name: Typecheck
|
|
run: pnpm exec tsc --noEmit
|
|
|
|
- name: Lint
|
|
run: pnpm run lint
|
|
|
|
- name: Build application
|
|
run: pnpm run build
|