diff --git a/.github/workflows/ci-check-and-unit-test.yml b/.github/workflows/ci-check-and-unit-test.yml index 955c6d82..a0b17519 100644 --- a/.github/workflows/ci-check-and-unit-test.yml +++ b/.github/workflows/ci-check-and-unit-test.yml @@ -32,10 +32,17 @@ jobs: with: 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 run: | npm clean-install 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 run: | @@ -44,7 +51,6 @@ jobs: working-directory: sources env: NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload' - DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com' DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}' - name: Run unit tests @@ -53,5 +59,4 @@ jobs: working-directory: sources env: NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload' - DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com' DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}' diff --git a/sources/develocity.config.js b/sources/develocity.config.js new file mode 100644 index 00000000..c9b3ad87 --- /dev/null +++ b/sources/develocity.config.js @@ -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; diff --git a/sources/jest.config.js b/sources/jest.config.js index 8f80b496..fc41075e 100644 --- a/sources/jest.config.js +++ b/sources/jest.config.js @@ -1,3 +1,5 @@ +const develocityReporter = require.resolve('@gradle-tech/develocity-agent/jest-reporter'); + module.exports = { clearMocks: true, moduleFileExtensions: ['js', 'ts', 'json'], @@ -8,7 +10,7 @@ module.exports = { }, reporters: [ 'default', - '@gradle-tech/develocity-agent/jest-reporter', + develocityReporter ], verbose: true } diff --git a/sources/package-lock.json b/sources/package-lock.json index b8ffaf46..4d0d936a 100644 --- a/sources/package-lock.json +++ b/sources/package-lock.json @@ -26,7 +26,6 @@ "which": "6.0.0" }, "devDependencies": { - "@gradle-tech/develocity-agent": "3.0.1", "@jest/globals": "30.2.0", "@types/jest": "30.0.0", "@types/node": "25.0.9", @@ -1384,32 +1383,6 @@ "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": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", diff --git a/sources/package.json b/sources/package.json index 1571913d..d9e017d8 100644 --- a/sources/package.json +++ b/sources/package.json @@ -51,7 +51,6 @@ "which": "6.0.0" }, "devDependencies": { - "@gradle-tech/develocity-agent": "3.0.1", "@jest/globals": "30.2.0", "@types/jest": "30.0.0", "@types/node": "25.0.9",