-
Notifications
You must be signed in to change notification settings - Fork 24
103 lines (80 loc) · 2.98 KB
/
ci.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
93
94
95
96
97
98
99
100
101
102
103
name: CI
on:
push:
jobs:
CI:
name: Monorepo CI flow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
cache: maven
- name: Build QuestDB
run: mvn clean package -f packages/browser-tests/questdb/pom.xml -DskipTests -P build-binaries
- name: Extract QuestDB
run: tar -xzf packages/browser-tests/questdb/core/target/questdb-*-rt-linux-x86-64.tar.gz -C tmp/
- name: Create DB Root
run: mkdir tmp/dbroot
- name: Start QuestDB
run: ./tmp/questdb-*-rt-linux-x86-64/bin/questdb.sh start -d ./tmp/dbroot
env:
QDB_DEV_MODE_ENABLED: "true"
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Build @questdb/react-components
run: yarn workspace @questdb/react-components run build
- name: Build @questdb/web-console
run: yarn workspace @questdb/web-console run build
- name: Run bundle watcher on @questdb/web-console
run: yarn workspace @questdb/web-console bundlewatch
- name: Run @questdb/web-console unit tests
run: yarn workspace @questdb/web-console run test:prod
- name: Run browser-tests test - auth
run: node packages/web-console/serve-dist.js & yarn workspace browser-tests test:auth
- name: Stop QuestDB
run: ./tmp/questdb-*-rt-linux-x86-64/bin/questdb.sh stop
- name: Start QuestDB, set auth credentials
run: ./tmp/questdb-*-rt-linux-x86-64/bin/questdb.sh start -d ./tmp/dbroot
env:
QDB_DEV_MODE_ENABLED: "true"
QDB_HTTP_USER: "admin"
QDB_HTTP_PASSWORD: "quest"
- name: Run browser-tests test
run: yarn workspace browser-tests test
- name: Print Log Files
if: success() || failure()
run: cat tmp/dbroot/log/*
- name: Save QuestDB log on test failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: questdb-log
path: tmp/dbroot/log/*
- name: Stop QuestDB
if: success() || failure()
run: ./tmp/questdb-*-rt-linux-x86-64/bin/questdb.sh stop
- name: Publish @questdb/web-console to npm
if: github.ref == 'refs/heads/main'
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
check-version: true
package: ./packages/web-console/package.json
- name: Publish @questdb/react-components to npm
if: github.ref == 'refs/heads/main'
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
check-version: true
package: ./packages/react-components/package.json