- The github action will check: - If the code can be build - If the code respect the linter
37 lines
777 B
YAML
37 lines
777 B
YAML
name: Build & Linter
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "**"
|
|
pull_request:
|
|
branches:
|
|
- "**"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
name: Build & Lint
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'pnpm'
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v3
|
|
with:
|
|
version: 8
|
|
run_install: false
|
|
- name: Install dependencies with pnpm
|
|
run: pnpm --prefix=./src/ install --frozen-lockfile
|
|
- name: Check linting
|
|
run: pnpm --prefix=./src/ exec eslint . --max-warnings=0
|
|
- name: Build
|
|
run: pnpm --prefix=./src/ run build
|
|
|