mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-03-23 13:40:44 +08:00
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
# Copied from https://github.com/facebook/docusaurus/blob/main/.github/workflows/lint.yml
|
|
name: Lint
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
DATABASE_URL: 'postgresql://postgres:password@localhost:5432/postgres'
|
|
GITHUB_CLIENT_ID: '1234'
|
|
GITHUB_CLIENT_SECRET: 'abcd'
|
|
NEXTAUTH_SECRET: 'efgh'
|
|
NEXTAUTH_URL: 'http://localhost:3000'
|
|
NODE_ENV: test
|
|
SUPABASE_ANON_KEY: 'ijkl'
|
|
SUPABASE_URL: 'https://abcd.supabase.co'
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
timeout-minutes: 30
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@v4
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '25.8.1'
|
|
cache: pnpm
|
|
cache-dependency-path: pnpm-lock.yaml
|
|
- name: Installation
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Lint
|
|
run: pnpm lint
|