Files
pnpm/.github/workflows/ci.yml
Zoltan Kochan cd2dc7d481 refactor: prefix internal scripts with . to hide them (#11051)
* fix: ensure PNPM_HOME/bin is in PATH during pnpm setup

When upgrading from old pnpm (global bin = PNPM_HOME) to new pnpm
(global bin = PNPM_HOME/bin), `pnpm setup` would fail because the
spawned `pnpm add -g` checks that the global bin dir is in PATH.
Prepend PNPM_HOME/bin to PATH in the spawned process env so the
check passes during the transition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: update pnpm to v11 beta 2

* chore: update pnpm to v11 beta 2

* chore: update pnpm to v11 beta 2

* chore: update pnpm to v11 beta 2

* fix: lint

* refactor: rename _-prefixed scripts to .-prefixed scripts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: update root package.json to use .test instead of _test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ci: update action-setup

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 14:30:56 +01:00

72 lines
2.5 KiB
YAML

name: CI
on: [push, pull_request]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
compile-and-lint:
# Skip pull_request events from PRs in the same repo. This prevents
# duplicate build jobs from running when creating a PR in the original repo.
# Exception: chore/update-lockfile PRs (created by automation with GITHUB_TOKEN, which doesn't trigger push events)
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository || github.head_ref == 'chore/update-lockfile' }}
name: Compile & Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install pnpm
uses: pnpm/action-setup@58e6119fe4f3092a76a7771efb55e04d25b6b26f
with:
standalone: true
- name: Setup Node
run: pnpm runtime -g set node 24.6.0
timeout-minutes: 2
- name: pnpm install
run: pnpm install
timeout-minutes: 3
- name: Compile TypeScript
run: pnpm run compile-only
- name: Lint
run: pnpm run lint
- name: Package compiled artifacts
run: tar -czf compiled.tar.gz --exclude='node_modules' $(find . -type d -name lib -not -path '*/node_modules/*') $(find . -name 'tsconfig.tsbuildinfo' -not -path '*/node_modules/*') pnpm/dist
- name: Upload compiled artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: compiled-packages
path: compiled.tar.gz
retention-days: 1
test-smoke:
name: ubuntu-latest / Node.js 24
needs: compile-and-lint
uses: ./.github/workflows/test.yml
with:
node: '24.0.0'
platform: ubuntu-latest
test:
name: ${{ matrix.platform }} / Node.js ${{ matrix.node }}
needs: test-smoke
strategy:
fail-fast: false
matrix:
node: ['22.13.0', '24.0.0', '25.0.0']
platform: [ubuntu-latest, windows-latest]
exclude:
- node: '24.0.0'
platform: ubuntu-latest
# On branches, only run Windows with the lowest supported Node.js
- node: ${{ github.ref != 'refs/heads/main' && '24.0.0' || 'none' }}
platform: windows-latest
- node: ${{ github.ref != 'refs/heads/main' && '25.0.0' || 'none' }}
platform: windows-latest
uses: ./.github/workflows/test.yml
with:
node: ${{ matrix.node }}
platform: ${{ matrix.platform }}