mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 16:09:05 +00:00
80 lines
2.2 KiB
YAML
80 lines
2.2 KiB
YAML
name: UI integration tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
# paths:
|
|
# - "web/**"
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
# paths:
|
|
# - "web/**"
|
|
|
|
env:
|
|
COLUMNS: 150
|
|
ZO_ROOT_USER_EMAIL: root@example.com
|
|
ZO_ROOT_USER_PASSWORD: Complexpass#123
|
|
ZO_BASE_URL: http://localhost:5080
|
|
# these are cypress related env vars
|
|
CYPRESS_ORGNAME: default
|
|
|
|
jobs:
|
|
ui_integration_tests:
|
|
name: ui_integration_tests
|
|
runs-on:
|
|
labels: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
browser: [chrome]
|
|
|
|
steps:
|
|
- name: Remove unused tools
|
|
run: |
|
|
sudo rm -rf /usr/share/dotnet
|
|
sudo rm -rf /opt/ghc
|
|
sudo rm -rf "/usr/local/share/boost"
|
|
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
|
|
|
- name: Clone the current repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust Toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: nightly-2023-12-24
|
|
targets: x86_64-unknown-linux-musl
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-on-failure: true
|
|
- name: Install Protoc
|
|
uses: arduino/setup-protoc@v2
|
|
with:
|
|
version: "21.12"
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Build frontend code
|
|
run: cd web && npm install && npm run build
|
|
|
|
- name: Build and run binary
|
|
run: cargo build --features mimalloc
|
|
|
|
- name: Start OpenObserve
|
|
run: target/debug/openobserve &
|
|
|
|
- name: Wait for start
|
|
run: sleep 10
|
|
|
|
- name: Ensure we are getting a reply from the server
|
|
run: curl http://localhost:5080/web/login
|
|
# You can test your matrix by printing the current Python version
|
|
# - name: Cypress run
|
|
# uses: cypress-io/github-action@v6.6.0
|
|
# with:
|
|
# browser: ${{ matrix.browser }}
|
|
# spec: cypress/e2e/tests
|
|
- name: Cypress run
|
|
run: cd tests/ui-testing && npm install && npx cypress run --env EMAIL=${ZO_ROOT_USER_EMAIL},PASSWORD=${ZO_ROOT_USER_PASSWORD},BASEURL=${ZO_BASE_URL},ORGNAME=${CYPRESS_ORGNAME} --headless --browser ${{ matrix.browser }} --spec ./cypress/e2e/tests/logs_tests.cy.js |