mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-04-24 04:46:22 +02:00
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
# Installs Node.js dependencies and pnpm, and checks formatting + linting
|
|
|
|
name: Lint Node.js
|
|
|
|
on:
|
|
workflow_call:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "v*"
|
|
pull_request:
|
|
paths-ignore:
|
|
- "src-tauri/**"
|
|
- "README.md"
|
|
- ".github/workflows/lint-rs.yml"
|
|
- ".github/workflows/osv.yml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
os: [macos-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Disable git core.autocrlf on Windows
|
|
if: matrix.os == 'windows-latest'
|
|
run: git config --global core.autocrlf false
|
|
|
|
- name: Checkout repository code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
|
|
|
|
- name: Set up pnpm package manager
|
|
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 #v4.4.0
|
|
with:
|
|
node-version-file: .node-version
|
|
cache: "pnpm"
|
|
|
|
- name: Install dependencies from lockfile
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run lint step
|
|
run: pnpm run lint:js
|