bug: fix seeding / perf of sql on tele #77
Workflow file for this run
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: tests | |
| on: | |
| pull_request: | |
| workflow_call: | |
| workflow_dispatch: | |
| concurrency: | |
| group: tests-${{ github.ref }}-${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Typecheck test suites | |
| run: yarn typecheck:tests | |
| - name: Run unit tests | |
| run: yarn test:unit | |
| sql: | |
| # Boots one shared TimescaleDB via testcontainers, drives the real | |
| # HasuraService.setup() migration pipeline once, then suites clone the | |
| # template database and exercise the triggers/functions in parallel. | |
| # Docker is available on GitHub-hosted runners. | |
| runs-on: ubuntu-24.04 | |
| env: | |
| # Locally the container is reused between runs to skip the boot and the | |
| # migration pipeline. A CI runner starts empty so there is nothing to | |
| # reuse, and on a shared runner a second job could rebuild the template | |
| # while this one is cloning it — so take the throwaway path. | |
| SQL_TEST_FRESH: "1" | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: yarn | |
| - name: Install dependencies (pre-pulling the database image) | |
| run: | | |
| docker pull -q timescale/timescaledb:latest-pg17 & | |
| yarn install --frozen-lockfile | |
| wait | |
| - name: Run SQL tests | |
| run: yarn test:sql |