Cluster fixes #426
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - next | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| nodejs: | |
| name: Test on Node.js v${{ matrix.node-version }} and OS ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [22.x, 24.x, 26.x] | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Restore dependencies cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| id: cache | |
| with: | |
| path: node_modules | |
| key: ${{ matrix.os }}-${{ matrix.node-version }}-node_modules-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ matrix.os }}-${{ matrix.node-version }}-node_modules- | |
| - name: Install Dependencies | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: npm i | |
| - name: Test | |
| run: npm run test-unit | |
| check: | |
| name: Run Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Use Node.js LTS | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: lts/* | |
| - name: Restore dependencies cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| id: cache | |
| with: | |
| path: node_modules | |
| key: ${{ matrix.os }}-${{ matrix.node-version }}-node_modules-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ matrix.os }}-${{ matrix.node-version }}-node_modules- | |
| - name: Install Dependencies | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: npm i | |
| - name: Test | |
| run: npm run lint && npm run check-prettier && npm run compile-typescript | |
| benchmarks: | |
| name: Run Benchmarks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Use Node.js LTS | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: lts/* | |
| - name: Restore dependencies cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| id: cache | |
| with: | |
| path: node_modules | |
| key: ${{ matrix.os }}-${{ matrix.node-version }}-node_modules-${{ hashFiles('**/package.json') }} | |
| restore-keys: | | |
| ${{ matrix.os }}-${{ matrix.node-version }}-node_modules- | |
| - name: Install Dependencies | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: npm i | |
| - name: Benchmark | |
| run: npm run benchmarks | |
| bun: | |
| name: Test on Bun | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version: latest | |
| - name: Install Dependencies | |
| run: bun install | |
| - name: Test | |
| run: bun test-unit | |
| check-license: | |
| name: Check license headers | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Check license headers | |
| run: | | |
| fail=false | |
| git ls-files '*.ts' '*.js' | while read file ; do | |
| if ! grep -Eq "(Copyright|generated|GENERATED)" <(awk 'NR<=3' "${file}") ; then | |
| echo "license header checking failed: ${file}" | |
| fail=true | |
| fi | |
| done | |
| if [[ "${fail}" == "true" ]] ; then | |
| echo "Some files failed license check" | |
| exit 1 | |
| fi |