forked from openobserve/openobserve
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (79 loc) · 2.98 KB
/
ui-testing.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
name: UI integration tests
on:
push:
branches:
- "main"
# paths:
# - "web/**"
pull_request:
branches:
- "*"
# paths:
# - "web/**"
env:
COLUMNS: 150
ZO_ROOT_USER_EMAIL: [email protected]
ZO_ROOT_USER_PASSWORD: Complexpass#123
ZO_BASE_URL: http://localhost:5080
# these are cypress related env vars
CYPRESS_ORGNAME: default
CYPRESS_CLOUD_TOKEN: ${{ secrets.CYPRESS_CLOUD_TOKEN }}
ZO_QUICK_MODE_NUM_FIELDS: 5
ZO_QUICK_MODE_STRATEGY : first
jobs:
ui_integration_tests:
name: ui_integration_tests
runs-on:
labels: ubuntu-latest
strategy:
matrix:
browser: [chrome]
testfilename: ["functions_tests.cy.js","logs_tests.cy.js","logs_queries.cy.js","logs_quickmode.cy.js","menu_tests.cy.js","alerts_tests.cy.js", "dashboard"]
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-2024-03-02
targets: x86_64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install Protoc
uses: arduino/setup-protoc@v3
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/[email protected]
# with:
# browser: ${{ matrix.browser }}
# spec: cypress/e2e/tests
- name: Cypress run no-fork
if: github.event.pull_request.head.repo.fork == false
run: |
cd tests/ui-testing && npm install && npx cypress run --record --key ${CYPRESS_CLOUD_TOKEN} --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/${{ matrix.testfilename }}
- name: Cypress run on fork
if: github.event.pull_request.head.repo.fork == true
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/${{ matrix.testfilename }}