add unit tests to verify bundle file whitelist #103
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
| # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
| name: 🧪 Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read # to fetch code (actions/checkout) | |
| jobs: | |
| unit: | |
| name: 🔬 Unit (${{ matrix.emoji }} ${{ matrix.os }}, Node ${{ matrix.node-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [20.x, 22.x, 24.x] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| include: | |
| - os: ubuntu-latest | |
| emoji: 🐧 | |
| - os: windows-latest | |
| emoji: 🪟 | |
| - os: macos-latest | |
| emoji: 🍎 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'pnpm' | |
| - run: pnpm install | |
| - run: pnpm run build | |
| - name: Lint & Type Check | |
| run: pnpm run test:eslint && pnpm run test:tsc | |
| - name: Unit Tests | |
| run: pnpm run test:unit | |
| env: | |
| CI: true | |
| e2e: | |
| name: 🌐 E2E (${{ matrix.emoji }} ${{ matrix.os }}) | |
| needs: unit | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| include: | |
| - os: ubuntu-latest | |
| emoji: 🐧 | |
| - os: windows-latest | |
| emoji: 🪟 | |
| - os: macos-latest | |
| emoji: 🍎 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Use Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: 'pnpm' | |
| - run: pnpm install | |
| - run: pnpm run build | |
| - name: Install E2E test dependencies | |
| run: pnpm --dir tests/e2e install | |
| - name: Type check E2E tests | |
| run: pnpm run test:tsc:e2e | |
| - name: Run E2E tests | |
| run: pnpm --dir tests/e2e test | |
| env: | |
| CI: true |