-
-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (43 loc) · 1.44 KB
/
ci.yml
File metadata and controls
53 lines (43 loc) · 1.44 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CI
on:
pull_request:
branches:
- main
# Cancel previous runs for the same branch to avoid duplicated builds
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
validate-and-compile:
runs-on: ubuntu-latest
steps:
# Checkout full repository history (useful for future release workflows)
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
# Ensure the package manager version declared in package.json is respected
- name: Enable Corepack
run: corepack enable
# Install pnpm explicitly for deterministic CI behavior
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
# Align Node.js version with local development (.nvmrc)
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
# Install dependencies strictly according to the lockfile
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
# Validate code quality (non-destructive)
# Fails if lint, formatting, or import organization issues exist
- name: Validate code quality
run: pnpm check
# Compile TypeScript sources to ensure extension integrity
- name: Compile extension
run: pnpm compile