Skip to content

Commit fe7288d

Browse files
committed
Run test in different major
1 parent 8054766 commit fe7288d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/test-optimization.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ jobs:
181181
- uses: ./.github/actions/testagent/start
182182
- uses: ./.github/actions/node/latest
183183
- uses: ./.github/actions/install
184+
- run: node scripts/replace-major.js 5
185+
- run: yarn test:plugins:ci
186+
- run: git checkout package.json # undo package.json changes
184187
- run: yarn test:plugins:ci
185188
- if: always()
186189
uses: ./.github/actions/testagent/logs

scripts/replace-major.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use strict'
2+
3+
const fs = require('fs')
4+
5+
const packageJson = require('../package.json')
6+
7+
const major = process.argv[2]
8+
9+
packageJson.version = `${major}.${packageJson.version.split('.')[1]}.${packageJson.version.split('.')[2]}`
10+
11+
fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 2))

0 commit comments

Comments
 (0)