Tanstack Start Migration #1646
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: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| test_unit: | |
| name: Run unit tests 🃏 | |
| timeout-minutes: 1 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.3 | |
| # - uses: ArtiomTr/jest-coverage-report-action@v2 | |
| # with: | |
| # package-manager: bun | |
| # test-script: bun test:coverage | |
| # annotations: failed-tests | |
| # TODO replace below with commented job above, blocked by Bun not yet supporting a JSON coverage reporter for the action to consume nor generate (similar: https://github.com/oven-sh/bun/issues/4099) | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run unit tests | |
| run: bun run test | |
| test_e2e: | |
| name: Run E2E tests 🗺️ | |
| timeout-minutes: 3 | |
| runs-on: ubuntu-latest | |
| # TODO enable, disabled for now while E2E tests are simple. No need to shard early | |
| # strategy: | |
| # fail-fast: false | |
| # shard tests across 4 nodes (https://playwright.dev/docs/test-sharding) | |
| # matrix: | |
| # shard: [1/4, 2/4, 3/4, 4/4] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Install Playwright | |
| run: bunx playwright install --with-deps | |
| - name: Load test environment variables | |
| uses: falti/[email protected] | |
| with: | |
| path: .env.test | |
| - name: Run E2E tests | |
| # TODO enable, disabled for now while E2E tests are simple. No need to shard early | |
| # run: bun test:e2e --shard ${{ matrix.shard }} | |
| run: bun test:e2e | |
| env: | |
| TEST_USERNAME: ${{ secrets.TEST_USERNAME }} | |
| TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }} | |
| AUTH_SECRET: ${{ secrets.AUTH_SECRET }} |