Skip to content

Commit 4a028c5

Browse files
PascalThuetclaude
andcommitted
ci: P1 optimizations — reduce redundant work in CI/CD pipelines
- Remove explicit `npm run build` in publish_npm.yml (prepack already triggers it) - Add karma-webdriver-launcher to devDependencies, remove ad hoc CI install - Add workflow concurrency cancellation for verify_pull_request and verify_branch - Narrow setup-dashjs cache key to root package-lock.json only - Use npm ci instead of npm install for samples/network-interceptor in deploy Refs Dash-Industry-Forum#5004 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d4afee5 commit 4a028c5

7 files changed

Lines changed: 845 additions & 8 deletions

File tree

.github/actions/setup-dashjs/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
uses: actions/cache@v4
1515
with:
1616
path: node_modules
17-
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}
17+
key: ${{ runner.os }}-build-${{ hashFiles('package-lock.json') }}
1818
restore-keys: |
1919
${{ runner.os }}-build-
2020
${{ runner.os }}-

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
for sample in "network-interceptor"; do
4747
echo "Building sample: $sample"
4848
cd samples/$sample
49-
npm install
49+
npm ci
5050
npm run build
5151
rm -rf node_modules
5252
done

.github/workflows/publish_npm.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,5 @@ jobs:
2525
- name: Install
2626
run: npm ci
2727

28-
- name: Build
29-
run: npm run build
30-
3128
- name: Publish
3229
run: npm publish

.github/workflows/verify_branch.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- '!v4_main'
1010
- '!v4_development'
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
build_and_unit_test:
1418
runs-on: ubuntu-24.04

.github/workflows/verify_pull_request.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- 'development'
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
10+
cancel-in-progress: true
11+
812
jobs:
913
merge_build_and_unit_test:
1014
runs-on: ubuntu-24.04
@@ -30,8 +34,6 @@ jobs:
3034
uses: actions/checkout@v4
3135
- name: Setup dash.js
3236
uses: ./.github/actions/setup-dashjs
33-
- name: Install karma-webdriver-launcher
34-
run: npm install karma-webdriver-launcher
3537
- name: Build modern bundle
3638
run: npm run webpack-build-modern
3739
- name: Start Tunnel

0 commit comments

Comments
 (0)