Skip to content

Commit a37e0b4

Browse files
committed
move gui tests to github action
1 parent 378ab08 commit a37e0b4

File tree

6 files changed

+183
-29
lines changed

6 files changed

+183
-29
lines changed

.drone.star renamed to .drone.example.star

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,16 @@ config = {
9191
},
9292
}
9393

94-
def main(ctx):
95-
pipelines = check_starlark() + \
96-
lint_gui_test() + \
97-
changelog(ctx)
98-
gui_tests = gui_test_pipeline(ctx)
99-
100-
return pipelines + \
101-
gui_tests + \
102-
pipelinesDependsOn(notification(), gui_tests)
94+
# def main(ctx):
95+
# pipelines = check_starlark() + \
96+
# lint_gui_test() + \
97+
# changelog(ctx)
98+
# gui_tests = gui_test_pipeline(ctx)
99+
#
100+
# # return pipelines + \
101+
# # gui_tests + \
102+
# # pipelinesDependsOn(notification(), gui_tests)
103+
# return []
103104

104105
def from_secret(name):
105106
return {
@@ -116,14 +117,14 @@ def check_starlark():
116117
"name": "format-check-starlark",
117118
"image": OC_CI_BAZEL_BUILDIFIER,
118119
"commands": [
119-
"buildifier --mode=check .drone.star",
120+
"buildifier --mode=check .drone.example.star",
120121
],
121122
},
122123
{
123124
"name": "show-diff",
124125
"image": OC_CI_BAZEL_BUILDIFIER,
125126
"commands": [
126-
"buildifier --mode=fix .drone.star",
127+
"buildifier --mode=fix .drone.example.star",
127128
"git diff",
128129
],
129130
"when": {

.github/workflows/gui-tests.yml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: GUI Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ master ]
7+
tags: [ "*" ]
8+
9+
env:
10+
DEFAULT_PHP_VERSION: "7.4"
11+
MYSQL: "mysql:8.0"
12+
OC_CI_ALPINE: "owncloudci/alpine:latest"
13+
OC_CI_CLIENT: "owncloudci/client:latest"
14+
OC_CI_DRONE_SKIP_PIPELINE: "owncloudci/drone-skip-pipeline"
15+
# OC_CI_NODEJS: "owncloudci/nodejs:18"
16+
OC_CI_PHP: "owncloudci/php:%s"
17+
OC_CI_WAIT_FOR: "owncloudci/wait-for:latest"
18+
# OC_OCIS: "owncloud/ocis-rolling:%s"
19+
OC_UBUNTU: "owncloud/ubuntu:20.04"
20+
# OC_CI_SQUISH: "owncloudci/squish:fedora-42-8.1.0-qt68x-linux64"
21+
PLUGINS_GIT_ACTION: "plugins/git-action:1"
22+
PLUGINS_S3: "plugins/s3:1.4.0"
23+
TOOLHIPPIE_CALENS: "toolhippie/calens:0.4.0"
24+
# npm packages to install
25+
NPM_GHERLINT: "@gherlint/gherlint@1.1.0"
26+
S3_PUBLIC_CACHE_SERVER: "https://cache.owncloud.com"
27+
S3_PUBLIC_CACHE_BUCKET: "public"
28+
29+
jobs:
30+
lint-gui-test:
31+
runs-on: ubuntu-latest
32+
container:
33+
# image: owncloudci/squish:fedora-42-8.1.0-qt68x-linux64
34+
image: prajwolamatya11/squish_fedora:latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
39+
- name: Setup NodeJs
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: 18
43+
44+
- name: Python lint
45+
run: |
46+
export PATH=$PATH:/github/home/.local/bin
47+
make -C test/gui install
48+
make -C test/gui python-lint
49+
50+
- name: Gherkin lint
51+
run: |
52+
npm install -g ${{ env.NPM_GHERLINT }}
53+
make -C test/gui gherkin-lint
54+
55+
gui-tests:
56+
runs-on: ubuntu-latest
57+
container:
58+
# image: owncloudci/squish:fedora-42-8.1.0-qt68x-linux64
59+
image: prajwolamatya11/squish_fedora:latest
60+
env:
61+
PLAYWRIGHT_BROWSERS_PATH: /__w/client/client/test/gui/.playwright
62+
services:
63+
ocis:
64+
image: owncloud/ocis-rolling:latest
65+
ports:
66+
- 9200:9200
67+
env:
68+
OCIS_URL: https://ocis:9200
69+
STORAGE_HOME_DRIVER: ocis
70+
STORAGE_USERS_DRIVER: ocis
71+
OCIS_LOG_LEVEL: "debug"
72+
OCIS_LOG_PRETTY: "true"
73+
OCIS_LOG_COLOR: "true"
74+
OCIS_INSECURE: "true"
75+
PROXY_ENABLE_BASIC_AUTH: "true"
76+
IDM_CREATE_DEMO_USERS: "true"
77+
OCIS_ADMIN_USER_ID: "some-admin-user-id-0000-000000000000"
78+
IDM_ADMIN_PASSWORD: "admin"
79+
OCIS_SYSTEM_USER_ID: "some-system-user-id-000-000000000000"
80+
OCIS_SYSTEM_USER_API_KEY: "some-system-user-machine-auth-api-key"
81+
OCIS_JWT_SECRET: "some-ocis-jwt-secret"
82+
OCIS_MACHINE_AUTH_API_KEY: "some-ocis-machine-auth-api-key"
83+
OCIS_TRANSFER_SECRET: "some-ocis-transfer-secret"
84+
COLLABORATION_WOPIAPP_SECRET: "some-wopi-secret"
85+
IDM_SVC_PASSWORD: "some-ldap-idm-password"
86+
GRAPH_LDAP_BIND_PASSWORD: "some-ldap-idm-password"
87+
IDM_REVASVC_PASSWORD: "some-ldap-reva-password"
88+
GROUPS_LDAP_BIND_PASSWORD: "some-ldap-reva-password"
89+
USERS_LDAP_BIND_PASSWORD: "some-ldap-reva-password"
90+
AUTH_BASIC_LDAP_BIND_PASSWORD: "some-ldap-reva-password"
91+
IDM_IDPSVC_PASSWORD: "some-ldap-idp-password"
92+
IDP_LDAP_BIND_PASSWORD: "some-ldap-idp-password"
93+
GATEWAY_STORAGE_USERS_MOUNT_ID: "storage-users-1"
94+
STORAGE_USERS_MOUNT_ID: "storage-users-1"
95+
GRAPH_APPLICATION_ID: "application-1"
96+
OCIS_SERVICE_ACCOUNT_ID: "service-account-id"
97+
OCIS_SERVICE_ACCOUNT_SECRET: "service-account-secret"
98+
99+
steps:
100+
- name: Checkout
101+
uses: actions/checkout@v4
102+
103+
- name: Build client
104+
run: |
105+
mkdir -p build
106+
cd build
107+
cmake -G"Ninja" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBUILD_TESTING=OFF -S ..
108+
ninja
109+
110+
- name: Install Python Modules
111+
run: |
112+
export PATH=$PATH:/github/home/.local/bin
113+
make -C test/gui install
114+
python3.10 -m pip list -v
115+
116+
- name: Create GUI test report directory
117+
run: |
118+
mkdir test/gui/guiReportUpload/screenshots -p
119+
chmod 777 test/gui -R
120+
121+
# - name: Wait for oCIS service
122+
# run: |
123+
# docker run --rm --network host ${{ env.OC_CI_WAIT_FOR }} https://ocis:9200 -t 300
124+
125+
- name: Run GUI test
126+
id: run_gui_test
127+
env:
128+
LICENSEKEY: ${{ secrets.SQUISH_LICENSEKEY }}
129+
GUI_TEST_REPORT_DIR: test/gui/guiReportUpload
130+
CLIENT_REPO: .
131+
OCIS_URL: https://ocis:9200
132+
BACKEND_HOST: https://ocis:9200
133+
SECURE_BACKEND_HOST: https://ocis:9200
134+
OCIS: true
135+
SERVER_INI: test/gui/drone/server.ini
136+
SQUISH_PARAMETERS: "--testsuite test/gui --reportgen html,test/gui/guiReportUpload --envvar QT_LOGGING_RULES=sync.httplogger=true;gui.socketapi=false --tags ~@skip --tags ~@skipOnLinux"
137+
STACKTRACE_FILE: test/gui/guiReportUpload/stacktrace.log
138+
OWNCLOUD_CORE_DUMP: 1
139+
RECORD_VIDEO_ON_FAILURE: false
140+
# allow to use any available pnpm version
141+
COREPACK_ENABLE_STRICT: 0
142+
HOME: /home/headless
143+
run: bash /dockerstartup/entrypoint.sh
144+
145+
# - name: Upload GUI test logs
146+
- name: Log GUI reports
147+
if: ${{ steps.run_gui_test.outcome == 'failure' }}
148+
env:
149+
GITHUB_REPO: ${{ github.repository }}
150+
GITHUB_RUN_NUMBER: ${{ github.run_number }}
151+
REPORT_DIR: test/gui/guiReportUpload
152+
SERVER_TYPE: ocis
153+
run: bash test/gui/drone/log_reports.sh ${REPORT_DIR} ${GITHUB_REPO} ${GITHUB_RUN_NUMBER} ${SERVER_TYPE}

.github/workflows/main.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: ownCloud CI
22

3-
on:
4-
push:
5-
branches:
6-
- master
7-
- '[0-9]+'
8-
pull_request:
9-
workflow_dispatch:
10-
11-
concurrency:
3+
#on:
4+
# push:
5+
# branches:
6+
# - master
7+
# - '[0-9]+'
8+
# pull_request:
9+
# workflow_dispatch:
10+
11+
concurrency:
1212
group: ${{ github.head_ref || github.run_id }}
1313
cancel-in-progress: true
1414

.github/workflows/stale.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: "Close stale issues"
2-
on:
3-
schedule:
4-
- cron: "0 0 * * *"
5-
workflow_dispatch:
2+
#on:
3+
# schedule:
4+
# - cron: "0 0 * * *"
5+
# workflow_dispatch:
66

77
permissions: {}
88

.github/workflows/translate.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: "Update translations"
22

3-
on:
4-
workflow_dispatch:
5-
#schedule:
6-
# - cron: "0 3 * * *"
3+
#on:
4+
# workflow_dispatch:
5+
# #schedule:
6+
# # - cron: "0 3 * * *"
77

88
permissions: {}
99

test/gui/drone/server.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[General]
2-
AUT/owncloud = "/drone/src/build/bin"
2+
AUT/owncloud = "/__w/client/client/build/bin"
33
AUTPMTimeout = "15000"

0 commit comments

Comments
 (0)