Skip to content

Commit 3faf92a

Browse files
authored
Merge pull request #993 from Sifchain/test/integration-test-poc
test: Initial release of smoke/integration tests + testing framework
2 parents 6e1548d + ff82bb9 commit 3faf92a

8 files changed

+454
-57
lines changed
+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: integration-test
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
pull_request:
7+
branches:
8+
- "*"
9+
jobs:
10+
smoke-tests:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: pnpm/action-setup@v3
16+
with:
17+
version: 9.4.0
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: "23"
22+
cache: "pnpm"
23+
24+
- name: Run smoke tests
25+
run: pnpm run smokeTests
26+
integration-tests:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: pnpm/action-setup@v3
32+
with:
33+
version: 9.4.0
34+
35+
- uses: actions/setup-node@v4
36+
with:
37+
node-version: "23"
38+
cache: "pnpm"
39+
40+
- name: Install dependencies
41+
run: pnpm install -r
42+
43+
- name: Build packages
44+
run: pnpm build
45+
46+
- name: Run integration tests
47+
env:
48+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
49+
run: |
50+
if [ -z "$OPENAI_API_KEY" ]; then
51+
echo "Skipping integration tests due to missing required API keys"
52+
exit 1
53+
else
54+
pnpm run integrationTests
55+
fi

package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
"docker:bash": "bash ./scripts/docker.sh bash",
1919
"docker:start": "bash ./scripts/docker.sh start",
2020
"docker": "pnpm docker:build && pnpm docker:run && pnpm docker:bash",
21-
"test": "bash ./scripts/test.sh"
21+
"test": "bash ./scripts/test.sh",
22+
"smokeTests": "bash ./scripts/smokeTests.sh",
23+
"integrationTests": "bash ./scripts/integrationTests.sh"
2224
},
2325
"devDependencies": {
2426
"@commitlint/cli": "18.6.1",
@@ -38,7 +40,8 @@
3840
"typedoc": "0.26.11",
3941
"typescript": "5.6.3",
4042
"vite": "5.4.11",
41-
"vitest": "2.1.5"
43+
"vitest": "2.1.5",
44+
"zx": "^8.2.4"
4245
},
4346
"pnpm": {
4447
"overrides": {

0 commit comments

Comments
 (0)