chore: use Prettier experimental CLI for formatting #6883
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: | |
| pull_request: ~ | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: $/.github/actions/setup | |
| - run: pnpm run build # Ensure packages pass attw, etc. | |
| - run: pnpm --filter=site check # Validate packages/site without a full Astro build. | |
| dedupe_check: | |
| name: Dedupe Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: $/.github/actions/setup | |
| - run: pnpm dedupe --check --prefer-offline | |
| flint: | |
| name: Flint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: $/.github/actions/setup | |
| - run: pnpm run --filter=site prebuild # Generate packages/site/.astro | |
| - run: pnpm run flint | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: $/.github/actions/setup | |
| - run: pnpm run --filter=site prebuild # Generate packages/site/.astro | |
| - run: pnpm run lint | |
| lint_knip: | |
| name: Lint Knip | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: $/.github/actions/setup | |
| - run: pnpm run build # Knip requires all exports to be generated. | |
| - run: pnpm run lint:knip | |
| - run: pnpm run lint:knip:prod | |
| typecheck: | |
| name: Typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: $/.github/actions/setup | |
| - run: pnpm exec tsc -b | |
| test_e2e: | |
| name: Test E2E (Node.js ${{ matrix.node-version }}, ${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - macos-latest | |
| - ubuntu-latest | |
| - windows-latest | |
| node-version: [26.1.0, 26] | |
| steps: | |
| - uses: $/.github/actions/setup | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Cache Vite Cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| key: vite-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| path: node_modules/.vite | |
| - name: Run e2e Tests | |
| run: pnpm run test --project e2e | |
| test_node: | |
| name: Test (Node.js ${{ matrix.node-version }}, ubuntu-latest) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [26.1.0, 26] | |
| steps: | |
| - uses: $/.github/actions/setup | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Cache Vite Cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| key: vite-cache-ubuntu-latest-${{ hashFiles('pnpm-lock.yaml') }} | |
| path: node_modules/.vite | |
| - name: Run Unit Tests | |
| run: pnpm run test --project='!e2e' | |
| test_os: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| id-token: write | |
| strategy: | |
| matrix: | |
| os: | |
| - macos-latest | |
| - windows-latest | |
| steps: | |
| - uses: $/.github/actions/setup | |
| - name: Cache Vite Cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| key: vite-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| path: node_modules/.vite | |
| - name: Run Unit Tests | |
| run: pnpm run test --project='!e2e' --coverage | |
| - name: Report Code Coverage | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7 | |
| if: ${{ !cancelled() && (matrix.os == 'macos-latest') }} | |
| with: | |
| fail_ci_if_error: true | |
| use_oidc: true | |
| check_rule_data_sort: | |
| name: Ensure rule data remains sorted | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: $/.github/actions/setup | |
| - run: pnpm run --filter=rule-data sort-data --check |