-
Notifications
You must be signed in to change notification settings - Fork 5.5k
113 lines (103 loc) · 3.24 KB
/
cloud-tests.yml
File metadata and controls
113 lines (103 loc) · 3.24 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Cloud Tests
# Runs cloud's lint/typecheck/unit/integration/playwright suite when cloud-* packages or tests change.
# Source: cloud/.github/workflows/tests.yml in the original elizaOS/cloud repo.
on:
workflow_dispatch:
pull_request:
branches: [develop, main]
paths:
- "packages/cloud-api/**"
- "packages/cloud-frontend/**"
- "packages/cloud-shared/**"
- "packages/cloud-sdk/**"
- "packages/cloud-services/**"
- "packages/scripts/cloud/**"
- "package.json"
- "bun.lock"
- ".github/workflows/cloud-tests.yml"
- ".github/actions/cloud-setup-test-env/**"
push:
branches: [develop, main]
paths:
- "packages/cloud-api/**"
- "packages/cloud-frontend/**"
- "packages/cloud-shared/**"
- "packages/cloud-sdk/**"
- "packages/cloud-services/**"
- "packages/scripts/cloud/**"
- "package.json"
- "bun.lock"
- ".github/workflows/cloud-tests.yml"
- ".github/actions/cloud-setup-test-env/**"
concurrency:
group: cloud-tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
DATABASE_URL: postgresql://postgres@127.0.0.1:5432/postgres
TEST_DATABASE_URL: postgresql://postgres@127.0.0.1:5432/postgres
CACHE_BACKEND: wadis
CACHE_ENABLED: "false"
NODE_OPTIONS: --max-old-space-size=4096
# Default to least privilege. Override per-job where needed.
permissions:
contents: read
jobs:
lint-and-types:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./.github/actions/cloud-setup-test-env
- name: Lint and typecheck cloud workspaces
run: bun run verify:cloud
unit-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
NODE_ENV: test
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./.github/actions/cloud-setup-test-env
- name: Run cloud unit tests
run: bun run test:cloud
integration-tests:
runs-on: ubuntu-latest
timeout-minutes: 25
env:
NODE_ENV: test
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./.github/actions/cloud-setup-test-env
with:
setup-db: "true"
- name: Run cloud integration tests
run: bun run test:cloud:integration
e2e-tests:
runs-on: ubuntu-latest
timeout-minutes: 35
needs: [lint-and-types]
env:
NODE_ENV: test
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./.github/actions/cloud-setup-test-env
with:
setup-db: "true"
- name: Run cloud e2e tests
run: bun run test:cloud:e2e
playwright:
runs-on: ubuntu-latest
timeout-minutes: 35
needs: [lint-and-types]
env:
NODE_ENV: test
PLAYWRIGHT_WORKERS: "1"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./.github/actions/cloud-setup-test-env
with:
setup-db: "true"
- name: Install Playwright browsers
run: bunx playwright install --with-deps chromium
- name: Run Playwright tests
run: bun run test:cloud:playwright