-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) 路 1.02 KB
/
Copy pathapi-tests.yml
File metadata and controls
40 lines (31 loc) 路 1.02 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
# This workflow runs a type check and builds the relevant apps if there are changes to the apps.
name: API Tests on Supabase DB
on:
workflow_dispatch:
branches: ["main"]
permissions:
contents: read
pull-requests: read
jobs:
api-tests:
runs-on: ubuntu-latest
env: # makes env vars available to all steps
DATABASE_URL: ${{ secrets.DATABASE_URL }}
strategy:
matrix:
node-version: [20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: pnpm install --frozen-lockfile
- name: Create .env for db package
run: echo "DATABASE_URL=${DATABASE_URL}" > packages/db/.env
- name: Create .env for api package
run: echo "DATABASE_URL=${DATABASE_URL}" > packages/api/.env
- run: pnpm run test:api