5
5
6
6
jobs :
7
7
CI :
8
- name : Editor Tests Flakiness Check
8
+ name : Monorepo CI flow
9
9
runs-on : ubuntu-latest
10
10
11
11
steps :
12
12
- uses : actions/checkout@v4
13
+ with :
14
+ submodules : " recursive"
15
+
16
+ - uses : actions/setup-java@v4
17
+ with :
18
+ java-version : " 17"
19
+ distribution : " temurin"
20
+ cache : maven
21
+
22
+ - name : Build QuestDB
23
+ run : mvn clean package -f packages/browser-tests/questdb/pom.xml -DskipTests -P build-binaries
24
+
25
+ - name : Extract QuestDB
26
+ run : tar -xzf packages/browser-tests/questdb/core/target/questdb-*-rt-linux-x86-64.tar.gz -C tmp/
27
+
28
+ - name : Create DB Root
29
+ run : mkdir tmp/dbroot
30
+
31
+ - name : Start QuestDB
32
+ run : ./tmp/questdb-*-rt-linux-x86-64/bin/questdb.sh start -d ./tmp/dbroot
33
+ env :
34
+ QDB_DEV_MODE_ENABLED : " true"
13
35
14
36
- uses : actions/setup-node@v4
15
37
with :
@@ -25,35 +47,58 @@ jobs:
25
47
- name : Build @questdb/web-console
26
48
run : yarn workspace @questdb/web-console run build
27
49
28
- - name : Start web console server
29
- run : node packages/web-console/serve-dist.js &
30
-
31
- - name : Run editor tests 10 times
32
- run : |
33
- for i in {1..10}; do
34
- echo "=== Running editor tests iteration $i ==="
35
-
36
- # Stop and remove any existing container
37
- docker stop questdb || true
38
- docker rm questdb || true
39
-
40
- # Start QuestDB with auth
41
- docker run -d --name questdb \
42
- -p 9000:9000 -p 9009:9009 \
43
- -e QDB_HTTP_USER=admin \
44
- -e QDB_HTTP_PASSWORD=quest \
45
- -e QDB_DEV_MODE_ENABLED=true \
46
- questdb/questdb:nightly
47
-
48
- # Wait for QuestDB to be ready
49
- sleep 10
50
-
51
- # Run the editor tests
52
- yarn workspace browser-tests test
53
-
54
- echo "=== Completed iteration $i ==="
55
- done
50
+ - name : Run bundle watcher on @questdb/web-console
51
+ run : yarn workspace @questdb/web-console bundlewatch
52
+
53
+ - name : Run @questdb/web-console unit tests
54
+ run : yarn workspace @questdb/web-console run test:prod
55
+
56
+ - name : Run browser-tests test - auth
57
+ run : node packages/web-console/serve-dist.js & yarn workspace browser-tests test:auth
58
+
59
+ - name : Stop QuestDB
60
+ run : ./tmp/questdb-*-rt-linux-x86-64/bin/questdb.sh stop
61
+
62
+ - name : Start QuestDB, set auth credentials
63
+ run : ./tmp/questdb-*-rt-linux-x86-64/bin/questdb.sh start -d ./tmp/dbroot
64
+ env :
65
+ QDB_DEV_MODE_ENABLED : " true"
66
+ QDB_HTTP_USER : " admin"
67
+ QDB_HTTP_PASSWORD : " quest"
68
+ QDB_CAIRO_MAT_VIEW_ENABLED : " true"
69
+
70
+ - name : Run browser-tests test
71
+ run : yarn workspace browser-tests test
72
+
73
+ - name : Print Log Files
74
+ if : success() || failure()
75
+ run : cat tmp/dbroot/log/*
76
+
77
+ - name : Save QuestDB log on test failure
78
+ if : failure()
79
+ uses : actions/upload-artifact@v4
80
+ with :
81
+ name : questdb-log
82
+ path : tmp/dbroot/log/*
56
83
57
84
- name : Stop QuestDB
58
85
if : success() || failure()
59
- run : docker stop questdb || true
86
+ run : ./tmp/questdb-*-rt-linux-x86-64/bin/questdb.sh stop
87
+
88
+ - name : Publish @questdb/react-components to npm
89
+ if : success() && github.ref == 'refs/heads/main'
90
+ uses : JS-DevTools/npm-publish@v1
91
+ with :
92
+ token : ${{ secrets.NPM_TOKEN }}
93
+ access : public
94
+ check-version : true
95
+ package : ./packages/react-components/package.json
96
+
97
+ - name : Publish @questdb/web-console to npm
98
+ if : success() && github.ref == 'refs/heads/main'
99
+ uses : JS-DevTools/npm-publish@v1
100
+ with :
101
+ token : ${{ secrets.NPM_TOKEN }}
102
+ access : public
103
+ check-version : true
104
+ package : ./packages/web-console/package.json
0 commit comments