ci(lint): adding a github action to check if lint is respected
- The github action will check: - If the code can be build - If the code respect the linter
This commit is contained in:
parent
3566513881
commit
0a9c700228
1 changed files with 37 additions and 0 deletions
37
.github/workflows/lint.yml
vendored
Normal file
37
.github/workflows/lint.yml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
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
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue