diff --git a/.github/workflows/npmPublish.yml b/.github/workflows/npmPublish.yml deleted file mode 100644 index dd933a242c..0000000000 --- a/.github/workflows/npmPublish.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: NPM Publish - -on: - release: - types: [published] - -jobs: - build: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "20" - registry-url: "https://registry.npmjs.org" - scope: "@hpcc-js" - - run: npm ci - - run: npm run lint-all - - run: npm run build - - run: npm run minimize - - run: npm run gen-legacy-types - - run: npm run compile-umd - - run: npm run build-gallery - - run: npm run build-test - # - run: npm run test re-enable when play is back online - - run: git stash - - run: npm run publish-lerna - env: - CI: true - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 18caff1fdf..d3d8b9d27b 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -16,6 +16,7 @@ jobs: steps: - name: Initialize Release Please id: release + if: ${{ github.event_name == 'push' }} uses: googleapis/release-please-action@v4 with: target-branch: ${{ github.ref_name }} @@ -24,11 +25,11 @@ jobs: manifest-file: .release-please-manifest.json - name: Checkout Sources - if: ${{ steps.release.outputs.release_created }} + if: ${{ github.event_name == 'pull_request' || steps.release.outputs.release_created }} if: ${{ steps.release.outputs.release_created }} uses: actions/checkout@v4 - name: Install NodeJS - if: ${{ steps.release.outputs.release_created }} + if: ${{ github.event_name == 'pull_request' || steps.release.outputs.release_created }} uses: actions/setup-node@v4 with: node-version: 20 @@ -36,12 +37,12 @@ jobs: scope: "@hpcc-js" - name: Install OS Dependencies - if: ${{ steps.release.outputs.release_created }} + if: ${{ github.event_name == 'pull_request' || steps.release.outputs.release_created }} run: | pip install pandas scikit-learn - name: Export GitHub Actions cache environment variables - if: ${{ steps.release.outputs.release_created }} + if: ${{ github.event_name == 'pull_request' || steps.release.outputs.release_created }} uses: actions/github-script@v7 with: script: | @@ -49,22 +50,28 @@ jobs: core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - name: Install Dependencies - if: ${{ steps.release.outputs.release_created }} + if: ${{ github.event_name == 'pull_request' || steps.release.outputs.release_created }} run: | npm ci - name: Lint - if: ${{ steps.release.outputs.release_created }} + if: ${{ github.event_name == 'pull_request' || steps.release.outputs.release_created }} run: | npm run lint-all - name: Build - if: ${{ steps.release.outputs.release_created }} + if: ${{ github.event_name == 'pull_request' || steps.release.outputs.release_created }} run: | + npm run stamp-all npm run build + npm run minimize + npm run gen-legacy-types + npm run compile-umd + npm run build-gallery + npm run build-test - name: Install Test Dependencies - if: ${{ steps.release.outputs.release_created }} + if: ${{ github.event_name == 'pull_request' || steps.release.outputs.release_created }} run: | sudo apt-get update sudo npx -y playwright install chromium --with-deps @@ -72,18 +79,18 @@ jobs: wget https://github.com/hpcc-systems/HPCC-Platform/releases/download/community_9.6.50-1/hpccsystems-platform-community_9.6.50-1jammy_amd64_withsymbols.deb - name: Install HPCC Platform - if: ${{ steps.release.outputs.release_created }} + if: ${{ github.event_name == 'pull_request' || steps.release.outputs.release_created }} continue-on-error: true run: | sudo apt install -f ./hpccsystems-platform-community_9.6.50-1jammy_amd64_withsymbols.deb sudo /etc/init.d/hpcc-init start - name: Test - if: ${{ steps.release.outputs.release_created }} + if: ${{ github.event_name == 'pull_request' || steps.release.outputs.release_created }} env: CI: true run: | - npm run test-local + npm run test # - name: Calculate Coverage # if: ${{ steps.release.outputs.release_created }} diff --git a/.github/workflows/releaseOnTag.yml b/.github/workflows/releaseOnTag.yml deleted file mode 100644 index 1a6043dfb4..0000000000 --- a/.github/workflows/releaseOnTag.yml +++ /dev/null @@ -1,14 +0,0 @@ -on: - push: - tags: - - "v*.*.*" - -name: Release -jobs: - build: - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Release - uses: softprops/action-gh-release@v1 diff --git a/.github/workflows/testPullRequest.yml b/.github/workflows/testPullRequest.yml deleted file mode 100644 index 8a08411eb7..0000000000 --- a/.github/workflows/testPullRequest.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Test PR - -on: - push: - branches: [trunk] - pull_request: - branches: [trunk,candidate-*] - -jobs: - build: - runs-on: ubuntu-22.04 - - strategy: - matrix: - node: ["22", "20", "18"] - fail-fast: false - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node }} - registry-url: "https://registry.npmjs.org" - scope: "@hpcc-js" - - run: npm ci - - run: npm run lint-all - - run: npm run build - - run: npm run compile-umd - - run: npm run build-gallery - - run: npm run build-test - - run: sudo apt-get update - - run: wget https://github.com/hpcc-systems/HPCC-Platform/releases/download/community_9.4.34-1/hpccsystems-platform-community_9.4.34-1jammy_amd64_withsymbols.deb - - name: Install HPCC Platform - continue-on-error: true - run: sudo apt install -f ./hpccsystems-platform-community_9.4.34-1jammy_amd64_withsymbols.deb - - run: sudo /etc/init.d/hpcc-init start - - run: npm run test - env: - CI: true diff --git a/package.json b/package.json index 052cf58d4b..dd1740cdf8 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "clean": "lerna run clean && npm run clean-root", "stamp": "lerna run stamp", "stamp-main": "node ./utils/bundle/src/stamp-main.js", + "stamp-all": "run-s stamp stamp-main", "compile-es6": "lerna run --ignore \"@hpcc-js/test-*\" compile-es6", "compile-es6-watch": "lerna run --no-sort --stream --ignore \"@hpcc-js/test-*\" compile-es6-watch", "compile-umd": "lerna run --ignore \"@hpcc-js/test-*\" compile-umd", @@ -92,20 +93,8 @@ "test:chrome": "lerna run test:chrome --scope \"@hpcc-js/test-*\"", "test:firefox": "lerna run test:firefox --scope \"@hpcc-js/test-*\"", "test:ie": "lerna run test:ie --scope \"@hpcc-js/test-*\"", - "publish-clean-lint": "run-p lint clean", - "publish-changed": "lerna changed", - "publish-version": "lerna version --no-push --yes", - "publish-update-lock": "npm i --package-lock-only", - "publish-tag": "node ./utils/bundle/src/tag.js", - "publish-commit": "git commit -a -m \"chore(publish): Bump versions and build all\"", - "publish-push": "git push --follow-tags upstream", + "publish": "lerna publish from-package --yes", "publish-lerna": "lerna publish from-package --yes", - "publish-manual": "run-s lint build minimize gen-legacy-types compile-umd publish-lerna", - "publish-prep": "run-s publish-clean-lint publish-version stamp build-all minimize gen-legacy-types test", - "publish-finalize": "run-s publish-commit publish-lerna", - "publish-gh-actions": "npm ci && npm run lint && npm run build && npm run minimize && npm run compile-umd && npm run build-gallery && npm run build-test && npm run test && npm run publish-lerna", - "publish": "lerna publish from-package -y", - "tag": "run-s publish-version stamp stamp-main publish-update-lock publish-commit publish-tag publish-push", "purge-jsdelivr": "node ./utils/purge-jsdelivr.js", "serve-docs": "vitepress dev .", "serve-docs-build": "vitepress serve --port 3000 .", @@ -179,4 +168,4 @@ "author": "HPCC Systems", "license": "Apache-2.0", "homepage": "https://github.com/hpcc-systems/Visualization" -} +} \ No newline at end of file