1- name : CI
1+ name : CLI PR Checks
22
33on :
44 pull_request :
55 branches : [main]
6+ paths :
7+ - ' extensions/cli/**'
68
79permissions :
810 contents : read
@@ -21,12 +23,17 @@ jobs:
2123 with :
2224 node-version : 20
2325 cache : " npm"
26+ cache-dependency-path : extensions/cli/package-lock.json
2427
2528 - name : Install dependencies
26- run : npm ci
29+ run : |
30+ cd extensions/cli
31+ npm ci
2732
2833 - name : Run linting
29- run : npm run lint
34+ run : |
35+ cd extensions/cli
36+ npm run lint
3037
3138 format-check :
3239 runs-on : ubuntu-latest
3946 with :
4047 node-version : 20
4148 cache : " npm"
49+ cache-dependency-path : extensions/cli/package-lock.json
4250
4351 - name : Install dependencies
44- run : npm ci
52+ run : |
53+ cd extensions/cli
54+ npm ci
4555
4656 - name : Debug environment info
4757 run : |
5161 echo "Platform: $(uname -a)"
5262
5363 - name : Check code formatting
54- run : npm run format:check
64+ run : |
65+ cd extensions/cli
66+ npm run format:check
5567
5668 test :
5769 strategy :
@@ -69,22 +81,31 @@ jobs:
6981 with :
7082 node-version : ${{ matrix.node-version }}
7183 cache : " npm"
84+ cache-dependency-path : extensions/cli/package-lock.json
7285
7386 - name : Install dependencies
74- run : npm ci
87+ run : |
88+ cd extensions/cli
89+ npm ci
7590
7691 - name : Build
77- run : npm run build
92+ run : |
93+ cd extensions/cli
94+ npm run build
7895
7996 # e2e tests are failing on Windows specifically - likely due to stdout flush issues
8097 - name : Run tests
8198 if : matrix.os != 'windows-latest'
82- run : npm test
99+ run : |
100+ cd extensions/cli
101+ npm test
83102
84103 - name : Run tests (excluding e2e on Windows)
85104 if : matrix.os == 'windows-latest'
86105 shell : bash
87- run : npm test -- --exclude='**/*.e2e.*' --exclude='**/e2e/**'
106+ run : |
107+ cd extensions/cli
108+ npm test -- --exclude='**/*.e2e.*' --exclude='**/e2e/**'
88109
89110 # GitHub does not have a way of requiring that all checks pass (you must manually select each job)
90111 # This action at least lets us manage the list of required tests via source control
@@ -101,4 +122,4 @@ jobs:
101122 - name : Decide whether the needed jobs succeeded or failed
102123 uses : re-actors/alls-green@release/v1
103124 with :
104- jobs : ${{ toJSON(needs) }}
125+ jobs : ${{ toJSON(needs) }}
0 commit comments