diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 48b03037..f92289c6 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -20,3 +20,74 @@ jobs: token: ${{ secrets.RELEASE_PLEASE_TOKEN }} config-file: release-please-config.json manifest-file: .release-please-manifest.json + + - name: Checkout Sources + if: ${{ steps.release.outputs.release_created }} + uses: actions/checkout@v4 + + - name: Install NodeJS + if: ${{ steps.release.outputs.release_created }} + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: "https://registry.npmjs.org" + scope: "@hpcc-js" + + - name: Install OS Dependencies + if: ${{ steps.release.outputs.release_created }} + run: | + sudo apt-get update + sudo apt-get install -y build-essential + sudo apt-get install -y git cmake ninja-build wget zip + sudo apt-get install -y gcc-multilib g++-multilib pkg-config autoconf bison libtool flex + sudo apt-get install -y python3 python3-pip + sudo apt-get install -y chromium + + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v7 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + + - name: Install Dependencies + if: ${{ steps.release.outputs.release_created }} + run: | + npm ci + npm run install-build-deps + + - name: Build + if: ${{ steps.release.outputs.release_created }} + run: | + npm run build + + - name: Test + if: ${{ steps.release.outputs.release_created }} + env: + CI: true + run: | + npm run test + + - name: Calculate Coverage + if: ${{ steps.release.outputs.release_created }} + run: | + npm run coverage + npm run coverage-report + + - name: Update Coveralls + if: ${{ steps.release.outputs.release_created }} + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish + if: ${{ steps.release.outputs.release_created }} + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + run: | + npm publish + + - name: Purge jsdelivr + if: ${{ steps.release.outputs.release_created }} + run: | + npm run purge-jsdelivr diff --git a/.github/workflows/test-and-publish.yml b/.github/workflows/test-and-publish.yml index f64c30d0..27765f8f 100644 --- a/.github/workflows/test-and-publish.yml +++ b/.github/workflows/test-and-publish.yml @@ -1,4 +1,4 @@ -name: test-and-publish +name: Test PR env: VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" @@ -63,30 +63,7 @@ jobs: npm run test - name: Calculate Coverage + if: ${{ matrix.node == 20 }} run: | npm run coverage npm run coverage-report - - - name: Update Coveralls - uses: coverallsapp/github-action@v2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish - if: github.ref_type == 'tag' - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - run: | - npm publish ${{ contains(github.ref, 'next') && '--tag next' || '' }} - - - name: Purge jsdelivr - if: github.ref_type == 'tag' - run: | - npm run purge-jsdelivr - - - name: Create Release - if: github.ref_type == 'tag' - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - prerelease: ${{ contains(github.ref, '-next.') }} diff --git a/package-lock.json b/package-lock.json index 68911b5c..bd6d1430 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,7 @@ "run-script-os": "1.1.6", "tslib": "2.6.3", "typedoc": "0.26.5", - "typedoc-plugin-markdown": "4.2.3", + "typedoc-plugin-markdown": "4.2.4", "typescript": "5.5.4", "typescript-eslint": "8.1.0", "vitepress": "1.3.2" @@ -4660,9 +4660,9 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.3.tgz", - "integrity": "sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", "dev": true, "license": "MIT", "dependencies": { @@ -17065,9 +17065,9 @@ } }, "node_modules/typedoc-plugin-markdown": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.2.3.tgz", - "integrity": "sha512-esucQj79SFYOv0f5XVha7QWdLUH5C5HRlDf7Z8CXzHedmVPn7jox6Gt7FdoBXN8AFxyHpa3Lbuxu65Dobwt+4Q==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.2.4.tgz", + "integrity": "sha512-9jdYqF5Sx1qxvSo7wV1mUHA2XYn3Y1DJ/ttCWW1V4lHdzDAwIA/EB9U92Ryx3GOSD73X1u8eTu8fBjoCmkURTQ==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 3cc89ded..6e92bc3d 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "git-push": "git push --follow-tags upstream trunk", "serve-docs": "vitepress serve docs", "serve": "ws", + "lint-skypack": "lerna run lint-skypack", "lint": "lerna run lint", "lint-fix": "npm run lint -- --fix", "test-node": "lerna run test-node", @@ -102,7 +103,7 @@ "run-script-os": "1.1.6", "tslib": "2.6.3", "typedoc": "0.26.5", - "typedoc-plugin-markdown": "4.2.3", + "typedoc-plugin-markdown": "4.2.4", "typescript": "5.5.4", "typescript-eslint": "8.1.0", "vitepress": "1.3.2" diff --git a/packages/base91/package.json b/packages/base91/package.json index c87f40b7..d9d6d7a4 100644 --- a/packages/base91/package.json +++ b/packages/base91/package.json @@ -27,7 +27,7 @@ "build": "run-p build-types build-ts", "lint-skypack": "npx -y @skypack/package-check", "lint-eslint": "eslint src/**/*.ts", - "lint": "run-p lint-eslint lint-skypack", + "lint": "run-p lint-eslint", "test-chrome": "karma start --single-run --browsers ChromiumHeadless karma.conf.cjs", "test-firefox": "karma start --single-run --browsers Firefox karma.conf.cjs", "test-node": "nyc mocha ./dist-test/index.node.js --reporter spec", diff --git a/packages/duckdb/package.json b/packages/duckdb/package.json index 0fa44f44..18219b4d 100644 --- a/packages/duckdb/package.json +++ b/packages/duckdb/package.json @@ -31,7 +31,7 @@ "build": "npm-run-all --serial pack-duckdb --parallel build-types build-ts", "lint-skypack": "npx -y @skypack/package-check", "lint-eslint": "eslint src/**/*.ts", - "lint": "run-p lint-eslint lint-skypack", + "lint": "run-p lint-eslint", "test-chrome": "karma start --single-run --browsers ChromiumHeadless karma.conf.cjs", "test-firefox": "karma start --single-run --browsers Firefox karma.conf.cjs", "test": "run-s test-chrome" diff --git a/packages/duckdb/test/duckdb.ts b/packages/duckdb/test/duckdb.ts index 68bf8c38..be76b2b8 100644 --- a/packages/duckdb/test/duckdb.ts +++ b/packages/duckdb/test/duckdb.ts @@ -2,6 +2,7 @@ import { expect } from "chai"; import { DuckDB } from "@hpcc-js/wasm-duckdb"; describe("duckdb", function () { + this.timeout(5000); it("version", async function () { const duckdb = await DuckDB.load(); const v = duckdb.version(); diff --git a/packages/expat/package.json b/packages/expat/package.json index 65367d54..8c92aa8e 100644 --- a/packages/expat/package.json +++ b/packages/expat/package.json @@ -27,7 +27,7 @@ "build": "run-p build-types build-ts", "lint-skypack": "npx -y @skypack/package-check", "lint-eslint": "eslint src/**/*.ts", - "lint": "run-p lint-eslint lint-skypack", + "lint": "run-p lint-eslint", "test-chrome": "karma start --single-run --browsers ChromiumHeadless karma.conf.cjs", "test-firefox": "karma start --single-run --browsers Firefox karma.conf.cjs", "test-node": "mocha ./dist-test/index.node.js --reporter spec", diff --git a/packages/graphviz-cli/package.json b/packages/graphviz-cli/package.json index 8d85b46c..3df920ba 100644 --- a/packages/graphviz-cli/package.json +++ b/packages/graphviz-cli/package.json @@ -30,7 +30,7 @@ "build": "run-p build-types build-ts", "lint-skypack": "npx -y @skypack/package-check", "lint-eslint": "eslint src/**/*.ts", - "lint": "run-p lint-eslint lint-skypack" + "lint": "run-p lint-eslint" }, "dependencies": { "@hpcc-js/wasm-graphviz": "1.1.0", diff --git a/packages/graphviz/package.json b/packages/graphviz/package.json index d43dc5eb..758f94f6 100644 --- a/packages/graphviz/package.json +++ b/packages/graphviz/package.json @@ -27,7 +27,7 @@ "build": "run-p build-types build-ts", "lint-skypack": "npx -y @skypack/package-check", "lint-eslint": "eslint src/**/*.ts", - "lint": "run-p lint-eslint lint-skypack", + "lint": "run-p lint-eslint", "test-chrome": "karma start --single-run --browsers ChromiumHeadless karma.conf.cjs", "test-firefox": "karma start --single-run --browsers Firefox karma.conf.cjs", "test-node": "mocha ./dist-test/index.node.js --reporter spec", diff --git a/packages/wasm/package.json b/packages/wasm/package.json index 6c920609..51d4dd69 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -66,7 +66,7 @@ "build": "run-p build-types build-ts", "lint-skypack": "npx -y @skypack/package-check", "lint-eslint": "eslint src/**/*.ts", - "lint": "run-p lint-eslint lint-skypack", + "lint": "run-p lint-eslint", "test-chrome": "karma start --single-run --browsers ChromiumHeadless karma.conf.cjs", "test-firefox": "karma start --single-run --browsers Firefox karma.conf.cjs", "test-node": "mocha ./dist-test/index.node.js --reporter spec", diff --git a/packages/zstd/package.json b/packages/zstd/package.json index 305eb4cb..b998a726 100644 --- a/packages/zstd/package.json +++ b/packages/zstd/package.json @@ -27,7 +27,7 @@ "build": "run-p build-types build-ts", "lint-skypack": "npx -y @skypack/package-check", "lint-eslint": "eslint src/**/*.ts", - "lint": "run-p lint-eslint lint-skypack", + "lint": "run-p lint-eslint", "test-chrome": "karma start --single-run --browsers ChromiumHeadless karma.conf.cjs", "test-firefox": "karma start --single-run --browsers Firefox karma.conf.cjs", "test-node": "mocha ./dist-test/index.node.js --reporter spec",