mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
ci: add commitlint, update eslint
This commit is contained in:
parent
380a84617a
commit
f428fac4e5
42
.github/workflows/lint.yml
vendored
42
.github/workflows/lint.yml
vendored
@ -1,30 +1,32 @@
|
|||||||
name: eslint
|
name: Lint
|
||||||
on:
|
on: [push, pull_request]
|
||||||
push:
|
# push:
|
||||||
branches:
|
# branches:
|
||||||
- main
|
# - main
|
||||||
# pull_request:
|
# pull_request:
|
||||||
# branches:
|
# branches:
|
||||||
# - main
|
# - main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
commitlint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v2
|
|
||||||
- name: Cache pnpm modules
|
|
||||||
uses: actions/cache@v2
|
|
||||||
env:
|
|
||||||
cache-name: cache-pnpm-modules
|
|
||||||
with:
|
with:
|
||||||
path: ~/.pnpm-store
|
fetch-depth: 0
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }}
|
- uses: wagoid/commitlint-github-action@v5
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
|
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
with:
|
with:
|
||||||
version: 6.3.0
|
configFile: .commitlintrc.js
|
||||||
run_install: false
|
eslint:
|
||||||
- run: pnpm install eslint
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
with:
|
||||||
|
version: 7
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
|
- run: pnpm install
|
||||||
- run: pnpm run lint
|
- run: pnpm run lint
|
Loading…
Reference in New Issue
Block a user