-
Notifications
You must be signed in to change notification settings - Fork 21
90 lines (85 loc) · 2.79 KB
/
Copy pathtest.yml
File metadata and controls
90 lines (85 loc) · 2.79 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
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
name: Test
on:
push:
branches: [main]
pull_request:
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
unit:
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- run: bun install --frozen-lockfile
- run: bun run test -- --filter=!@buzzkit/marketing
- run: NODE_OPTIONS=--no-warnings bunx vitest run test/actor test/engine test/api test/libs test/queue test/utils test/providers test/packages
working-directory: apps/api
- run: bun run test:e2e
working-directory: apps/ping
marketing:
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- run: bun install --frozen-lockfile
- run: bun run test
working-directory: apps/marketing
integration:
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- run: bun install --frozen-lockfile
- run: docker compose up -d postgres tinybird --wait --wait-timeout 180
- run: bun db:push
working-directory: packages/database
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5460/buzzkit
- name: Push Tinybird definitions
working-directory: packages/tinybird
run: |
for attempt in 1 2 3 4 5 6; do
bun run push && exit 0
echo "Tinybird Local not ready yet (attempt $attempt), retrying in 10s"
sleep 10
done
exit 1
- name: Write test secrets
run: |
cat > apps/api/.dev.vars <<VARS
ENVIRONMENT=development
TINYBIRD_URL=http://localhost:7181
BETTER_AUTH_URL=http://localhost:8791/v1/auth
BETTER_AUTH_SECRET=$(openssl rand -base64 32)
CREDENTIAL_MASTER_KEY_V1=$(openssl rand -base64 32)
SQIDS_ALPHABET=$(node -e "console.log([...'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'].sort(() => Math.random() - 0.5).join(''))")
DASHBOARD_URL=http://localhost:5180
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
AXIOM_API_TOKEN=
AXIOM_LOGS_DATASET=
AXIOM_TRACES_DATASET=
OTEL_EXPORTER_OTLP_ENDPOINT=
VARS
- run: bun run test
working-directory: apps/api