-
-
Notifications
You must be signed in to change notification settings - Fork 9
56 lines (52 loc) · 1.68 KB
/
Copy pathtests.yml
File metadata and controls
56 lines (52 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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