chore(deps): update oxlint monorepo #1138
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: | |
| paths-ignore: | |
| - '**/*.md' | |
| branches: [next] | |
| pull_request: | |
| types: [opened, synchronize] | |
| paths-ignore: | |
| - '**/*.md' | |
| branches: [next] | |
| merge_group: | |
| permissions: | |
| id-token: write | |
| actions: write | |
| jobs: | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: typecheck-${{ github.workflow }}-#${{ github.event.pull_request.number || github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run lint | |
| run: pnpm run lint | |
| - name: Check dedupe | |
| run: pnpm dedupe --check | |
| - name: Run typecheck | |
| run: pnpm run typecheck | |
| - name: Run format check | |
| run: pnpm run fmtcheck | |
| - name: Run build | |
| run: pnpm run build | |
| - name: Run site build | |
| run: pnpm run site:build | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | |
| node: ['22', '24'] | |
| # 1-based index | |
| shardIndex: [1, 2, 3, 4, 5] | |
| shardTotal: [5] | |
| name: Test (${{ matrix.os }}, ${{ matrix.node }}, ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}) | |
| runs-on: ${{ matrix.os }} | |
| concurrency: | |
| group: test-${{ github.workflow }}-#${{ github.event.pull_request.number || github.head_ref || github.ref }}-(${{ matrix.os }}, ${{ matrix.node }}, ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}) | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Start Redis (MacOS or Linux) | |
| if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' }} | |
| uses: shogo82148/actions-setup-redis@30eda5a8d2b309c784b5dffcc0090f3442ee7f03 # v1 | |
| with: | |
| redis-version: '7' | |
| auto-start: 'true' | |
| - name: Start Redis (Windows via Memurai) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| shell: pwsh | |
| run: | | |
| choco install -y memurai-developer.install | |
| # ensure service exists and running (avoid non-zero return code of net start) | |
| $svc = Get-Service -Name Memurai -ErrorAction SilentlyContinue | |
| if (-not $svc) { | |
| Write-Error "Memurai service not found after install" | |
| exit 1 | |
| } | |
| if ($svc.Status -ne 'Running') { | |
| Start-Service -Name Memurai -ErrorAction Stop | |
| # wait for 20s until Running | |
| $svc.WaitForStatus('Running', '00:00:20') | |
| } else { | |
| Write-Host "Memurai already running." | |
| } | |
| # wait for 6379 port ready (max ~60s) | |
| $deadline = (Get-Date).AddSeconds(60) | |
| $ready = $false | |
| while ((Get-Date) -lt $deadline -and -not $ready) { | |
| try { | |
| $client = New-Object System.Net.Sockets.TcpClient | |
| $async = $client.BeginConnect('127.0.0.1', 6379, $null, $null) | |
| $ok = $async.AsyncWaitHandle.WaitOne(2000) | |
| if ($ok -and $client.Connected) { $ready = $true } | |
| $client.Close() | |
| } catch { } | |
| } | |
| if (-not $ready) { | |
| Write-Error "Memurai (Redis) not ready on 127.0.0.1:6379" | |
| exit 1 | |
| } | |
| Write-Host "Memurai is ready on 127.0.0.1:6379" | |
| # install and start MySQL (will automatically start mysqld) | |
| - name: Start MySQL (macOS or Linux) | |
| if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' }} | |
| uses: shogo82148/actions-setup-mysql@27e74fac04c136a9f4c2dc2ed457df57331b3e0c # v1 | |
| with: | |
| mysql-version: '8' | |
| auto-start: 'true' | |
| - name: Init DB (macOS or Linux) | |
| if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' }} | |
| run: | | |
| mysql -uroot -e "CREATE DATABASE IF NOT EXISTS test;" | |
| - name: Start MySQL (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| shell: pwsh | |
| run: | | |
| choco install -y mysql | |
| refreshenv | |
| # MySQL default root has no password, set a password and create database/user | |
| # & mysqladmin -u root password root | |
| & mysql -uroot -e "CREATE DATABASE IF NOT EXISTS test;" | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run tests | |
| run: pnpm run ci --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | |
| - name: Code Coverage | |
| # skip on windows, it will hangup on codecov | |
| if: ${{ matrix.os != 'windows-latest' }} | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5 | |
| with: | |
| use_oidc: true | |
| test-egg-bin: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | |
| os: ['ubuntu-latest', 'windows-latest'] | |
| node: ['22'] | |
| # 0-based index | |
| shardIndex: [0, 1, 2] | |
| shardTotal: [3] | |
| name: Test bin (${{ matrix.os }}, ${{ matrix.node }}, ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}) | |
| runs-on: ${{ matrix.os }} | |
| concurrency: | |
| group: test-egg-bin-${{ github.workflow }}-#${{ github.event.pull_request.number || github.head_ref || github.ref }}-(${{ matrix.os }}, ${{ matrix.node }}, ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}) | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run tests | |
| run: pnpm run --filter=./tools/egg-bin ci | |
| env: | |
| # https://github.com/jamiebuilds/ci-parallel-vars | |
| CI_NODE_INDEX: ${{ matrix.shardIndex }} | |
| CI_NODE_TOTAL: ${{ matrix.shardTotal }} | |
| - name: Code Coverage | |
| # skip on windows, it will hangup on codecov https://github.com/codecov/codecov-action/issues/1787 | |
| if: ${{ matrix.os != 'windows-latest' }} | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5 | |
| with: | |
| use_oidc: true | |
| test-egg-scripts: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ['ubuntu-latest'] | |
| node: ['22', '24'] | |
| name: Test scripts (${{ matrix.os }}, ${{ matrix.node }}) | |
| runs-on: ${{ matrix.os }} | |
| concurrency: | |
| group: test-egg-scripts-${{ github.workflow }}-#${{ github.event.pull_request.number || github.head_ref || github.ref }}-(${{ matrix.os }}, ${{ matrix.node }}) | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run tests | |
| run: pnpm run --filter=./tools/scripts ci | |
| - name: Code Coverage | |
| if: ${{ matrix.os != 'windows-latest' }} | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5 | |
| with: | |
| use_oidc: true | |
| done: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - test | |
| - test-egg-bin | |
| - test-egg-scripts | |
| - typecheck | |
| steps: | |
| - run: exit 1 | |
| if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }} |