-
Notifications
You must be signed in to change notification settings - Fork 4
27 lines (27 loc) · 849 Bytes
/
lint.yml
File metadata and controls
27 lines (27 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
on: [pull_request]
name: Lint Changed Files
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0
- name: Extract Node.js version
run: echo "NODE_VERSION=$(sed -n 's/FROM node:\([0-9.]*\).*/\1/p' Dockerfile)" >> $GITHUB_ENV
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm ci
- name: Lint changed files
run: npx eslint
env:
DESTINATION_REF: ${{ github.event.pull_request.base.ref }}
- name: TypeScript check
run: npx tsc --noEmit
env:
DESTINATION_REF: ${{ github.event.pull_request.base.ref }}