Add npm build scans (#517)

This commit is contained in:
Daz DeBoer 2025-01-21 07:37:50 -07:00 committed by GitHub
commit 52d4223bcd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 43 additions and 2 deletions

View file

@ -15,6 +15,7 @@ permissions:
jobs:
check-format-and-unit-test:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@ -31,13 +32,26 @@ jobs:
with:
gradle-version: "8.12"
- name: Check formatting and compile
- name: Install npm dependencies
run: |
npm clean-install
working-directory: sources
- name: Check formatting and compile
run: |
npm run check
npm run compile
working-directory: sources
env:
NODE_OPTIONS: '-r @gradle/develocity-agent/preload'
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
- name: Run unit tests
run: |
npm test
working-directory: sources
env:
NODE_OPTIONS: '-r @gradle/develocity-agent/preload'
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'

View file

@ -39,7 +39,11 @@ jobs:
npm run check
npm run compile
working-directory: sources
env:
NODE_OPTIONS: '-r @gradle/develocity-agent/preload'
DEVELOCITY_URL: https://ge.solutions-team.gradle.com
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: Copy the generated sources/dist directory to the top-level dist
run: |
cp -r sources/dist .

6
build
View file

@ -2,6 +2,12 @@
cd sources
if [[ -f ~/.gradle/develocity/keys.properties ]]; then
export NODE_OPTIONS='-r @gradle/develocity-agent/preload'
export DEVELOCITY_URL=https://ge.solutions-team.gradle.com
export DEVELOCITY_ACCESS_KEY=$(paste -sd ';' ~/.gradle/develocity/keys.properties)
fi
case "$1" in
all)
npm run all

View file

@ -28,6 +28,7 @@
"which": "5.0.0"
},
"devDependencies": {
"@gradle/develocity-agent": "https://develocity-npm-pkgs.gradle.com/gradle-develocity-agent-0.9.0.tgz",
"@types/jest": "29.5.14",
"@types/node": "20.17.14",
"@types/unzipper": "0.10.10",
@ -1246,6 +1247,16 @@
"integrity": "sha512-gIhjdJp/c2beaIWWIlsXdqXVRUz3r2BxBCpfz/F3JXHvSAQ1paMYjLH+maEATtENg+k5eLV7gA+9yPp762ieuw==",
"dev": true
},
"node_modules/@gradle/develocity-agent": {
"version": "0.9.0",
"resolved": "https://develocity-npm-pkgs.gradle.com/gradle-develocity-agent-0.9.0.tgz",
"integrity": "sha512-uqCelicA2CzdvuYqix7sxdLUUkN6YdqfKZQewaSYYUhWi19OLlJeaMYzFMMEfPRqJ0/8LSt+KI228Lvlk+vZ0A==",
"dev": true,
"license": "SEE LICENSE AT https://gradle.com/help/legal-terms-of-use",
"engines": {
"node": ">=18.20.5"
}
},
"node_modules/@humanwhocodes/config-array": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
@ -11163,6 +11174,11 @@
"integrity": "sha512-gIhjdJp/c2beaIWWIlsXdqXVRUz3r2BxBCpfz/F3JXHvSAQ1paMYjLH+maEATtENg+k5eLV7gA+9yPp762ieuw==",
"dev": true
},
"@gradle/develocity-agent": {
"version": "https://develocity-npm-pkgs.gradle.com/gradle-develocity-agent-0.9.0.tgz",
"integrity": "sha512-uqCelicA2CzdvuYqix7sxdLUUkN6YdqfKZQewaSYYUhWi19OLlJeaMYzFMMEfPRqJ0/8LSt+KI228Lvlk+vZ0A==",
"dev": true
},
"@humanwhocodes/config-array": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",

View file

@ -50,6 +50,7 @@
"which": "5.0.0"
},
"devDependencies": {
"@gradle/develocity-agent": "https://develocity-npm-pkgs.gradle.com/gradle-develocity-agent-0.9.0.tgz",
"@types/jest": "29.5.14",
"@types/node": "20.17.14",
"@types/unzipper": "0.10.10",