test: cover multi-file neutering race on drop #242
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - beta | |
| - "[0-9]+.[0-9]+.x" | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint, format & types | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type-check (tsc) | |
| run: npm run type-check | |
| - name: Lint (oxlint) | |
| run: npm run lint | |
| - name: Check formatting (oxfmt) | |
| run: npm run format:check | |
| # Type-aware linting runs oxlint's tsgolint backend on typescript-go. Kept | |
| # non-blocking while type-aware linting is still alpha upstream. | |
| - name: Type-aware lint (oxlint + tsgolint) | |
| run: npm run lint:type-aware | |
| continue-on-error: true | |
| test: | |
| name: Run tests on Node.js ${{ matrix.node-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [20, 22, 24] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm run test:cov | |
| - name: Collect coverage | |
| if: matrix.node-version == 24 | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| file: ./coverage/lcov.info | |
| size: | |
| name: Check bundle size | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Install dependencies | |
| run: npm ci | |
| # Runs size-limit (builds first via the `presize` script), failing if the main entry exceeds | |
| # its budget — e.g. if the full MIME table leaks back out of the `file-selector/mime` subpath. | |
| - name: Check bundle size | |
| run: npm run size | |
| e2e: | |
| name: Run e2e (browser) tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Run e2e tests | |
| run: npm run test:e2e |