diff --git a/.github/workflows/all-packages.yml b/.github/workflows/all-packages.yml index c4ca2fb8759..8186030044f 100644 --- a/.github/workflows/all-packages.yml +++ b/.github/workflows/all-packages.yml @@ -32,7 +32,7 @@ jobs: ${{ runner.os }}-node- - name: Install NPM dependencies - run: npm ci + run: npm ci --no-audit - name: Check dependencies run: node_modules/.bin/packster check --all --error @@ -58,7 +58,7 @@ jobs: ${{ runner.os }}-node- - name: Install NPM dependencies - run: npm ci + run: npm ci --no-audit - name: Check dependencies run: node_modules/.bin/syncpack-list-mismatches @@ -112,10 +112,10 @@ jobs: cache-max-size: 3g - name: Install NPM dependencies - run: npm ci + run: npm ci --no-audit - name: Build packages - run: npm run build + run: node_modules/.bin/ultra -r --build - name: Setup local network run: npm run configure diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 199fc66e537..e75e290faf8 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -55,13 +55,13 @@ jobs: cache-max-size: 3g - name: Install NPM dependencies - run: npm ci + run: npm ci --no-audit - name: Run ESLinter run: npm run lint - name: Build packages - run: npm run build + run: node_modules/.bin/ultra -r --build - name: Setup local network run: npm run configure diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 833f9500dd6..0d0b16f299d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,7 +45,7 @@ jobs: ${{ runner.os }}-node- - name: Install NPM dependencies - run: npm ci + run: npm ci --no-audit - name: Build packages run: npm run build @@ -85,7 +85,7 @@ jobs: ${{ runner.os }}-node- - name: Install NPM dependencies - run: npm ci + run: npm ci --no-audit - name: Build packages run: npm run build # TODO: Build only for Drive and deps @@ -177,7 +177,7 @@ jobs: ${{ runner.os }}-node- - name: Install NPM dependencies - run: npm ci + run: npm ci --no-audit - name: Build packages run: npm run build # TODO: Build only for DAPI and deps @@ -272,3 +272,5 @@ jobs: tags: ${{ steps.drive_docker_meta.outputs.tags }} labels: ${{ steps.drive_docker_meta.outputs.labels }} platforms: linux/amd64,linux/arm64 + +# TOOD: release test suite docker image diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 67decd42969..a0e593f06b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,13 +40,13 @@ jobs: ${{ runner.os }}-node- - name: Install NPM dependencies - run: npm ci # TODO: Run only for specified package + run: npm ci --no-audit - name: Run ESLinter run: npm run lint -w ${{ inputs.package }} --if-present - name: Build package - run: npm run build # TODO: Run only for specified package and deps + run: node_modules/.bin/ultra -r --build --filter "+${{ inputs.package }}" - name: Setup dotenv files run: npm run configure:dotenv diff --git a/.gitignore b/.gitignore index f51d72cb7f0..d0b1827a3ac 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ node_modules .nyc_output *.log + +# Ultra runner build cache +.ultra.cache.json diff --git a/packages/dapi-grpc/.npmignore b/packages/dapi-grpc/.npmignore index ca2d888a7ec..2b3ec03d4f9 100644 --- a/packages/dapi-grpc/.npmignore +++ b/packages/dapi-grpc/.npmignore @@ -3,3 +3,6 @@ clients/*/v*/python clients/*/v*/java node_modules + +# Ultra runner build cache +.ultra.cache.json diff --git a/packages/feature-flags-contract/package.json b/packages/feature-flags-contract/package.json index 9cf3491ccf0..7b6b351d3d7 100644 --- a/packages/feature-flags-contract/package.json +++ b/packages/feature-flags-contract/package.json @@ -3,6 +3,7 @@ "version": "0.2.1", "description": "Data Contract to store Dash Platform feature flags", "scripts": { + "build": "", "lint": "eslint .", "test": "npm run test:unit", "test:unit": "mocha 'test/unit/**/*.spec.js'" diff --git a/packages/js-dapi-client/.npmignore b/packages/js-dapi-client/.npmignore index a427b631fa9..405c06eb5df 100644 --- a/packages/js-dapi-client/.npmignore +++ b/packages/js-dapi-client/.npmignore @@ -5,3 +5,6 @@ node_modules # ignore generated code coverage output .nyc_output + +# Ultra runner build cache +.ultra.cache.json diff --git a/packages/js-dapi-client/package.json b/packages/js-dapi-client/package.json index 16678bf7779..edb364125ea 100644 --- a/packages/js-dapi-client/package.json +++ b/packages/js-dapi-client/package.json @@ -74,7 +74,7 @@ "lib" ], "scripts": { - "build": "webpack", + "build:web": "webpack", "lint": "eslint .", "test": "npm run test:coverage && npm run test:browsers", "test:unit": "mocha './test/unit/**/*.spec.js'", @@ -82,7 +82,7 @@ "test:node": "NODE_ENV=test mocha", "test:browsers": "karma start ./karma.conf.js --single-run", "test:coverage": "NODE_ENV=test nyc --check-coverage --stmts=98 --branch=98 --funcs=98 --lines=95 mocha 'test/unit/**/*.spec.js' 'test/integration/**/*.spec.js'", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build:web" }, "license": "MIT" } diff --git a/packages/js-dash-sdk/.npmignore b/packages/js-dash-sdk/.npmignore index fd4f2b066b3..9079f9e663b 100644 --- a/packages/js-dash-sdk/.npmignore +++ b/packages/js-dash-sdk/.npmignore @@ -1,2 +1,6 @@ node_modules + .DS_Store + +# Ultra runner build cache +.ultra.cache.json diff --git a/packages/js-dash-sdk/package.json b/packages/js-dash-sdk/package.json index da277063e2e..bd8a13d81ce 100644 --- a/packages/js-dash-sdk/package.json +++ b/packages/js-dash-sdk/package.json @@ -7,14 +7,14 @@ "types": "dist/src/index.d.ts", "scripts": { "start:dev": "nodemon --exec 'npm run build && npm run test:unit'", - "build": "npm run build:web", + "build": "npm run build:ts", "build:web": "npm run build:ts && webpack --stats-error-details", "build:ts": "tsc", "test": "npm run test:unit && npm run test:functional && npm run test:browsers", "test:browsers": "karma start ./karma.conf.js --single-run", "test:unit": "TS_NODE_COMPILER_OPTIONS='{\"target\":\"es6\"}' mocha -r ts-node/register/transpile-only \"src/**/*.spec.ts\"", "test:functional": "npm run build && mocha --recursive tests/functional/**/*.js", - "prepublishOnly": "npm run build", + "prepublishOnly": "npm run build:web", "prepare": "npm run build" }, "repository": { diff --git a/packages/js-dpp/.npmignore b/packages/js-dpp/.npmignore index a938b696894..ee95fdbac2d 100644 --- a/packages/js-dpp/.npmignore +++ b/packages/js-dpp/.npmignore @@ -2,3 +2,6 @@ # do not track dependencies node_modules + +# Ultra runner build cache +.ultra.cache.json diff --git a/packages/js-dpp/package.json b/packages/js-dpp/package.json index 2661efb77b1..a7bcc8c890a 100644 --- a/packages/js-dpp/package.json +++ b/packages/js-dpp/package.json @@ -5,11 +5,11 @@ "scripts": { "lint": "eslint .", "test": "npm run test:coverage && npm run test:browsers", - "build": "webpack --stats-error-details", + "build:web": "webpack --stats-error-details", "test:node": "NODE_ENV=test mocha", "test:browsers": "karma start ./karma.conf.js --single-run", "test:coverage": "NODE_ENV=test nyc --check-coverage --stmts=98 --branch=94 --funcs=95 --lines=98 mocha 'test/unit/**/*.spec.js' 'test/integration/**/*.spec.js'", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build:web" }, "main": "lib/DashPlatformProtocol.js", "contributors": [ diff --git a/packages/js-grpc-common/package.json b/packages/js-grpc-common/package.json index dd038005472..8767ff9975c 100644 --- a/packages/js-grpc-common/package.json +++ b/packages/js-grpc-common/package.json @@ -4,6 +4,7 @@ "description": "Common GRPC library", "main": "index.js", "scripts": { + "build": "", "lint": "eslint .", "test": "npm run test:coverage", "test:coverage": "nyc --check-coverage --stmts=95 --branch=95 --funcs=95 --lines=95 mocha 'test/unit/**/*.spec.js' 'test/integration/**/*.spec.js'", diff --git a/packages/platform-test-suite/Dockerfile b/packages/platform-test-suite/Dockerfile index c55578501ed..f1ee4086e8d 100644 --- a/packages/platform-test-suite/Dockerfile +++ b/packages/platform-test-suite/Dockerfile @@ -12,7 +12,7 @@ WORKDIR / RUN npm config set unsafe-perm true COPY package.json package-lock.json ./ -RUN npm ci --production +RUN npm ci --loglevel info --no-audit --production FROM node:16-alpine diff --git a/packages/wallet-lib/package.json b/packages/wallet-lib/package.json index 1c13cdba19b..b0c2c4ba950 100644 --- a/packages/wallet-lib/package.json +++ b/packages/wallet-lib/package.json @@ -5,7 +5,7 @@ "main": "src/index.js", "unpkg": "dist/wallet-lib.min.js", "scripts": { - "build": "webpack --stats-error-details", + "build:web": "webpack --stats-error-details", "lint": "eslint .", "lint:fix": "eslint . --fix", "test:unit": "nyc mocha 'src/**/*.spec.js'", @@ -13,7 +13,7 @@ "test:integration": "nyc mocha 'tests/integration/**/*.spec.js'", "test:browsers": "karma start ./karma.conf.js --single-run", "test": "npm run test:unit && npm run test:integration && npm run test:functional && npm run test:browsers", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build:web" }, "files": [ "dist",