chore: add public-hoist-pattern #38
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: "Run tests on NodeJS" | |
| on: | |
| push: | |
| paths: | |
| - ".github/workflows/nodejs.yml" | |
| - "src/**" | |
| - "tests/**" | |
| - "types/**" | |
| - "biome.jsonc" | |
| - "package.json" | |
| - "pnpm-lock.yaml" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/nodejs.yml" | |
| - "src/**" | |
| - "tests/**" | |
| - "types/**" | |
| - "biome.jsonc" | |
| - "package.json" | |
| - "pnpm-lock.yaml" | |
| workflow_dispatch: | |
| jobs: | |
| default: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ["18", "20", "22", "24"] | |
| os: ["macos-latest", "ubuntu-latest", "windows-latest"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 10 | |
| - name: "Install NSIS (macOS)" | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew update | |
| brew install nsis | |
| - name: "Install NSIS (Ubuntu)" | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get -y update | |
| sudo apt-get -y install nsis | |
| - name: "Install NSIS (Windows)" | |
| if: matrix.os == 'windows-latest' | |
| shell: pwsh | |
| run: | | |
| [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
| iwr -useb get.scoop.sh -outfile 'install.ps1' | |
| .\install.ps1 -RunAsAdmin | |
| scoop bucket add nsis https://github.com/NSIS-Dev/scoop-nsis | |
| scoop install nsis/nsis | |
| - name: "Print NSIS version" | |
| run: makensis -VERSION | |
| - name: "Print NSIS header info" | |
| run: makensis -HDRINFO | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: "Get pnpm store directory" | |
| id: pnpm-cache | |
| run: | | |
| echo "::set-output name=pnpm_store_path::$(pnpm store path)" | |
| - uses: actions/cache@v4 | |
| name: "Setup pnpm cache" | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.pnpm_store_path }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: "Install dependencies" | |
| run: pnpm install --frozen-lockfile --strict-peer-dependencies | |
| - name: "Lint Source" | |
| if: matrix.os != 'windows-latest' | |
| run: pnpm exec biome ci | |
| - name: "Build Source" | |
| run: pnpm run --if-present build | |
| - name: "Run Tests" | |
| run: pnpm run --if-present test |