mirror of
https://github.com/gradle/actions.git
synced 2026-03-02 17:49:49 +08:00
Use recommended DV config for npm
This commit is contained in:
9
.github/workflows/ci-check-and-unit-test.yml
vendored
9
.github/workflows/ci-check-and-unit-test.yml
vendored
@@ -32,10 +32,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
gradle-version: '8.14.2'
|
gradle-version: '8.14.2'
|
||||||
|
|
||||||
|
- name: Install Develocity npm agent
|
||||||
|
run: |
|
||||||
|
npm exec -y -- pacote extract @gradle-tech/develocity-agent@3.0.1 ~/.node_libraries/@gradle-tech/develocity-agent
|
||||||
|
|
||||||
- name: Install npm dependencies
|
- name: Install npm dependencies
|
||||||
run: |
|
run: |
|
||||||
npm clean-install
|
npm clean-install
|
||||||
working-directory: sources
|
working-directory: sources
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
|
||||||
|
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
|
||||||
|
|
||||||
- name: Check formatting and compile
|
- name: Check formatting and compile
|
||||||
run: |
|
run: |
|
||||||
@@ -44,7 +51,6 @@ jobs:
|
|||||||
working-directory: sources
|
working-directory: sources
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
|
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
|
||||||
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
|
||||||
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
|
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
@@ -53,5 +59,4 @@ jobs:
|
|||||||
working-directory: sources
|
working-directory: sources
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
|
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
|
||||||
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
|
||||||
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
|
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
|
||||||
|
|||||||
10
sources/develocity.config.js
Normal file
10
sources/develocity.config.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { fromPropertiesFile, inGradleUserHome } from '@gradle-tech/develocity-agent/api/config';
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
server: {
|
||||||
|
url: 'https://ge.solutions-team.gradle.com/',
|
||||||
|
accessKey: fromPropertiesFile(inGradleUserHome())
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
const develocityReporter = require.resolve('@gradle-tech/develocity-agent/jest-reporter');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
clearMocks: true,
|
clearMocks: true,
|
||||||
moduleFileExtensions: ['js', 'ts', 'json'],
|
moduleFileExtensions: ['js', 'ts', 'json'],
|
||||||
@@ -8,7 +10,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
reporters: [
|
reporters: [
|
||||||
'default',
|
'default',
|
||||||
'@gradle-tech/develocity-agent/jest-reporter',
|
develocityReporter
|
||||||
],
|
],
|
||||||
verbose: true
|
verbose: true
|
||||||
}
|
}
|
||||||
|
|||||||
27
sources/package-lock.json
generated
27
sources/package-lock.json
generated
@@ -26,7 +26,6 @@
|
|||||||
"which": "6.0.0"
|
"which": "6.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gradle-tech/develocity-agent": "3.0.1",
|
|
||||||
"@jest/globals": "30.2.0",
|
"@jest/globals": "30.2.0",
|
||||||
"@types/jest": "30.0.0",
|
"@types/jest": "30.0.0",
|
||||||
"@types/node": "25.0.9",
|
"@types/node": "25.0.9",
|
||||||
@@ -1384,32 +1383,6 @@
|
|||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@gradle-tech/develocity-agent": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@gradle-tech/develocity-agent/-/develocity-agent-3.0.1.tgz",
|
|
||||||
"integrity": "sha512-iYD41N7Wi49E+Qns4ra4D6TQNcIp2M5yH7z96DWlo4xRBkFXdSKKd7UpRkd+6xs0sPDatgNYTHX2c3gRosfbYQ==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "SEE LICENSE AT https://gradle.com/help/legal-terms-of-use",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18.20.5"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@jest/jest-message-util": ">=29.6",
|
|
||||||
"@jest/reporters": ">=29.6",
|
|
||||||
"mocha": ">=7.0.1"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"@jest/jest-message-util": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@jest/reporters": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"mocha": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@humanfs/core": {
|
"node_modules/@humanfs/core": {
|
||||||
"version": "0.19.1",
|
"version": "0.19.1",
|
||||||
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
|
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
|
||||||
|
|||||||
@@ -51,7 +51,6 @@
|
|||||||
"which": "6.0.0"
|
"which": "6.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gradle-tech/develocity-agent": "3.0.1",
|
|
||||||
"@jest/globals": "30.2.0",
|
"@jest/globals": "30.2.0",
|
||||||
"@types/jest": "30.0.0",
|
"@types/jest": "30.0.0",
|
||||||
"@types/node": "25.0.9",
|
"@types/node": "25.0.9",
|
||||||
|
|||||||
Reference in New Issue
Block a user