-
Notifications
You must be signed in to change notification settings - Fork 50
33 lines (27 loc) · 1 KB
/
pr-checks.yml
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
28
29
30
31
32
33
name: PR Check
on: [pull_request] # Triggers on commits to PRs only.
jobs:
lint: # Job name.
runs-on: ubuntu-latest # Host's operating system.
steps:
- name: Checkout commit # Download the code from triggering commit.
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Cache NPM # Leverage npm cache on repeated workflow runs if package.json didn't change.
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/vscode/package-lock.json') }} # Make sure to target the `vscode` directory.
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: |
cd vscode # Change directory to `vscode`.
npm ci
- name: Run linter
run: |
cd vscode # Again, ensure we're inside the `vscode` directory.
npm run lint