fix(cli): restore Deno support for packaged CLI #685
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: test-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 24 | |
| - name: Enable pnpm | |
| shell: bash | |
| run: | | |
| corepack enable | |
| PNPM_VERSION="$(node -p 'const pm = require("./package.json").packageManager; const match = pm && pm.match(/^pnpm@(.+)$/); if (!match) throw new Error("packageManager must be pnpm@<version>"); match[1]')" | |
| corepack prepare "pnpm@${PNPM_VERSION}" --activate | |
| echo "PNPM_STORE_PATH=$(pnpm store path)" >> "$GITHUB_ENV" | |
| - name: Cache pnpm store | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: ${{ env.PNPM_STORE_PATH }} | |
| key: pnpm-store-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| pnpm-store-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| # Build every workspace package up front via the turbo graph so | |
| # workspace:* dependencies (the CLI's @prisma/cli-engine) have | |
| # their dist output before anything imports them. | |
| - name: Build workspace packages | |
| run: pnpm build | |
| - name: Run CLI tests | |
| run: pnpm --filter @prisma/cli test | |
| # A changed engine must claim a version the registry does not have | |
| # yet, or the release ships a CLI built against exports the published | |
| # engine lacks (how prisma@8.0.0-rc.4 broke `npx prisma@next`). | |
| engine-version: | |
| if: ${{ github.event_name == 'pull_request' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 24 | |
| - name: The engine version must be new if the engine changed | |
| env: | |
| # The base branch by name: the event's base.sha is recorded when | |
| # the pull request is created and goes stale as the base moves, | |
| # which blamed other merges' engine changes on unrelated PRs. | |
| BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| run: node scripts/check-engine-version.mjs "origin/$BASE_REF" |