chore: update packageManager to pnpm@10.32.1 #2
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: | |
| - master | |
| pull_request: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - name: Lint | |
| run: pnpm run lint | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - name: Typecheck | |
| run: pnpm run typecheck | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [1, 2, 3, 4, 5, 6, 7, 8] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - name: Install Playwright | |
| run: pnpm run test:install | |
| - name: Run tests | |
| run: pnpm run test --shard=${{ matrix.shard }}/8 | |
| test-e2e: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - name: Build website | |
| run: pnpm run build:website | |
| - name: Install Playwright | |
| run: pnpm run test:install | |
| - name: Run e2e tests | |
| run: pnpm run test:e2e | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - uses: ./.github/actions/cache | |
| - name: Build packages | |
| run: pnpm run build:package | |
| - name: Build website | |
| run: pnpm run build | |
| publish-snapshot: | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - uses: ./.github/actions/cache | |
| - name: Build packages | |
| run: pnpm run build:package | |
| - name: Publish snapshot packages | |
| if: ${{ github.event_name == 'pull_request' }} | |
| run: | | |
| max_attempts=8 | |
| base_sleep=10 | |
| for attempt in $(seq 1 "${max_attempts}"); do | |
| echo "Attempt ${attempt} to publish snapshot packages..." | |
| if pnpm run ci:publish:snapshot; then | |
| echo "Publish snapshot packages succeeded" | |
| break | |
| elif [ "${attempt}" -eq "${max_attempts}" ]; then | |
| echo "Publish snapshot packages failed" | |
| exit 1 | |
| fi | |
| sleep_duration=$((base_sleep * attempt)) | |
| echo "Sleeping ${sleep_duration}s before retry..." | |
| sleep "${sleep_duration}" | |
| done | |
| linkcheck: | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - uses: ./.github/actions/cache | |
| - name: Build | |
| run: pnpm run build | |
| - name: Check links | |
| uses: lycheeverse/lychee-action@v2.7.0 | |
| with: | |
| workingDirectory: website/dist | |
| args: > | |
| --include-fragments | |
| --index-files 'index.html' | |
| --root-dir "$PWD" | |
| --no-progress | |
| --format detailed | |
| --accept 100..=103,200..=299,403 | |
| --retry-wait-time 5 | |
| --max-retries 5 | |
| --exclude 'https://floating-ui.com' | |
| --remap "^https://prosekit\.dev\/examples file://$(pwd)/examples" | |
| './**/*.html' | |
| debug: false | |
| fail: true | |
| failIfEmpty: true | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| env: | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - uses: ./.github/actions/cache | |
| - name: Build | |
| run: pnpm run build | |
| - name: Deploy to Cloudflare Pages | |
| uses: cloudflare/wrangler-action@v3 | |
| if: ${{ env.CLOUDFLARE_ACCOUNT_ID != '' }} | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
| command: pages deploy website/dist --project-name=prosekit --branch="${{ github.head_ref || github.ref_name }}" | |
| timeout-minutes: 10 |