-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (89 loc) · 2.19 KB
/
test.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: ci
on:
push:
branches: [main]
tags: [v*]
pull_request:
branches: [main]
env:
CI: true
FORCE_COLOR: true
jobs:
ci:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
services:
mysql:
image: mysql:latest
env:
MYSQL_DATABASE: mysql
MYSQL_ROOT_PASSWORD: mysql
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
postgres:
image: postgres:latest
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
wsproxy:
image: ghcr.io/neondatabase/wsproxy:latest
env:
APPEND_PORT: "postgres:5432"
ALLOW_ADDR_REGEX: ".*"
LOG_TRAFFIC: "true"
ports:
- "5488:80"
depends_on:
- postgres
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: bun install --frozen-lockfile
- run: bun tsc
- run: bun cycles
- run: bun test:bun
- run: bun test:node
- run: bun test:deno
- run: bunx jsr publish --config jsr.json --dry-run
publishNPM:
runs-on: ubuntu-latest
needs: ci
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install --frozen-lockfile
- run: |
npm config set //registry.npmjs.org/:_authToken ${{secrets.NPM_AUTH_TOKEN}}
npm publish
publishJSR:
runs-on: ubuntu-latest
needs: ci
permissions:
contents: read
id-token: write
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install --frozen-lockfile
- run: bunx jsr publish --config jsr.json