ENG-681 Automate database testing #3
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: "database-tests" | |
| on: | |
| pull_request: | |
| paths: | |
| - "packages/database/**" | |
| env: | |
| SUPABASE_USE_DB: local | |
| SUPABASE_PROJECT_ID: test | |
| GITHUB_TEST: test | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.15.1 | |
| run_install: false | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Setup database | |
| working-directory: ./packages/database | |
| run: pnpm run setup | |
| - name: Serve and run tests | |
| working-directory: ./packages/database | |
| run: | | |
| pnpm run serve & | |
| wait 2 ; pnpm run test |