-
Notifications
You must be signed in to change notification settings - Fork 19
57 lines (57 loc) · 1.64 KB
/
examples.yml
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
57
name: examples
on: [push]
jobs:
bun:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dir: "examples/bun-mysql2"
qs: "mysql"
- dir: "examples/bun-postgres"
qs: "postgresql"
- dir: "examples/bun-pg"
qs: "postgresql"
steps:
- uses: actions/checkout@v4
- uses: sqlc-dev/setup-sqlc@v4
with:
sqlc-version: '1.24.0'
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun install
working-directory: ${{ matrix.dir }}
- run: echo "DATABASE_URL=$(sqlc createdb --queryset ${{ matrix.qs }})" >> $GITHUB_ENV
working-directory: examples/authors
env:
SQLC_AUTH_TOKEN: ${{ secrets.SQLC_AUTH_TOKEN }}
- run: bun run src/main.ts
working-directory: ${{ matrix.dir }}
node:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dir: "examples/node-mysql2"
qs: "mysql"
- dir: "examples/node-postgres"
qs: "postgresql"
- dir: "examples/node-pg"
qs: "postgresql"
steps:
- uses: actions/checkout@v4
- uses: sqlc-dev/setup-sqlc@v4
with:
sqlc-version: '1.24.0'
- uses: actions/setup-node@v4
- run: npm install
working-directory: ${{ matrix.dir }}
- run: npx tsc
working-directory: ${{ matrix.dir }}
- run: echo "DATABASE_URL=$(sqlc createdb --queryset ${{ matrix.qs }})" >> $GITHUB_ENV
working-directory: examples/authors
env:
SQLC_AUTH_TOKEN: ${{ secrets.SQLC_AUTH_TOKEN }}
- run: node ./src/main.js
working-directory: ${{ matrix.dir }}