prod update #125
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: Run Tests | |
| on: | |
| pull_request: | |
| jobs: | |
| test: | |
| if: github.base_ref == 'main' | |
| runs-on: ubuntu-latest | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: "1.2.18" | |
| - name: Cache Bun dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.bun | |
| node_modules | |
| key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun- | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Generate Prisma client | |
| run: bun run generate | |
| - name: Run tests | |
| run: bun jest | |
| skip-tests: | |
| if: github.base_ref != 'main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Skip tests for non-main PR | |
| run: echo "Tests skipped - PR is not targeting main branch" |