Skip to content

chore(ui): run web console tests with context path #4

chore(ui): run web console tests with context path

chore(ui): run web console tests with context path #4

name: Run Tests With Context Path
on:
push:
jobs:
run_tests_with_context_path:
name: Running Tests With Context Path
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"
QDB_HTTP_CONTEXT_PATH: "/context"
- 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"
QDB_HTTP_CONTEXT_PATH: "/context"
- 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