mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-09 03:37:45 +03:00
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: Lint
|
|
|
|
on: pull_request
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Cache node modules
|
|
id: cache-npm
|
|
uses: actions/cache@v4
|
|
env:
|
|
cache-name: cache-node-modules
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
${{ runner.os }}-build-
|
|
${{ runner.os }}-
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20.11.1
|
|
|
|
- name: Install dependencies
|
|
run: yarn
|
|
|
|
- name: Validate current commit (last commit) with commitlint
|
|
run: npx commitlint --last --verbose
|
|
|
|
- name: Typecheck
|
|
run: yarn typecheck
|
|
|
|
- name: Lint
|
|
run: yarn lint
|
|
|
|
- name: Format check
|
|
run: yarn format-check
|