diff --git a/.github/workflows/onRelease.yml b/.github/workflows/onRelease.yml index 305e083..f7180d9 100644 --- a/.github/workflows/onRelease.yml +++ b/.github/workflows/onRelease.yml @@ -27,7 +27,7 @@ jobs: registry-url: https://registry.npmjs.org - name: Install npm >= 11.5.1 run: npm install -g "npm@>=11.5.1" - - run: pnpm install + - run: pnpm install --frozen-lockfile - run: pnpm build - run: pnpm prepack - run: npm publish --provenance --access public diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7f99e35..e553f1c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,14 +2,22 @@ name: tests on: push: branches-ignore: [main] + paths-ignore: + - '**.md' + - 'LICENSE' + - '.gitignore' workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: unit-tests: strategy: matrix: os: ['ubuntu-latest'] - node_version: [lts/-1, lts/*, 24] + node_version: [lts/*, 24] fail-fast: false runs-on: ${{ matrix.os }} steps: @@ -31,6 +39,8 @@ jobs: solana: ${{ env.SOLANA_VERSION }} cache: true artifacts: false - - run: pnpm install + - run: pnpm install --frozen-lockfile - run: pnpm run build + env: + CI: true - run: pnpm run test diff --git a/.mocharc.json b/.mocharc.json index fa25f20..24260e9 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -8,6 +8,7 @@ "recursive": true, "reporter": "spec", "timeout": 60000, + "parallel": true, "node-option": [ "loader=ts-node/esm", "experimental-specifier-resolution=node" diff --git a/package.json b/package.json index 6a96b97..b6e705d 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "repository": "metaplex-foundation/cli", "scripts": { "clean": "shx rm -rf dist tsconfig.build.tsbuildinfo", - "prebuild": "pnpm run clean", + "prebuild": "if [ -z \"$CI\" ]; then pnpm run clean; fi", "build": "tsc -b tsconfig.build.json --verbose", "build:clean": "pnpm run clean && pnpm run build", "dev": "./bin/dev.js",