Skip to content

Commit f485d4d

Browse files
committed
move gui tests to github action
1 parent e3995f8 commit f485d4d

File tree

2 files changed

+135
-11
lines changed

2 files changed

+135
-11
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: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
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/[email protected]"
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+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
38+
- name: Setup NodeJs
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: 18
42+
43+
- name: Python lint
44+
run: |
45+
make -C test/gui install
46+
make -C test/gui python-lint
47+
48+
- name: Gherkin lint
49+
run: |
50+
npm install -g ${{ env.NPM_GHERLINT }}
51+
make -C test/gui gherkin-lint
52+
53+
gui-tests:
54+
runs-on: ubuntu-latest
55+
container:
56+
image: owncloudci/squish:fedora-42-8.1.0-qt68x-linux64
57+
services:
58+
ocis:
59+
image: owncloud/ocis-rolling:latest
60+
env:
61+
OCIS_URL: https://ocis:9200
62+
IDM_ADMIN_PASSWORD: admin
63+
STORAGE_HOME_DRIVER: ocis
64+
STORAGE_USERS_DRIVER: ocis
65+
OCIS_INSECURE: true
66+
PROXY_ENABLE_BASIC_AUTH: true
67+
OCIS_LOG_LEVEL: error
68+
OCIS_LOG_PRETTY: true
69+
OCIS_LOG_COLOR: true
70+
ports:
71+
- 9200:9200
72+
steps:
73+
- name: Checkout
74+
uses: actions/checkout@v4
75+
76+
- name: Build client
77+
run: |
78+
mkdir -p build
79+
cd build
80+
cmake -G"Ninja" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBUILD_TESTING=OFF -S ..
81+
ninja
82+
83+
- name: Install Python Modules
84+
env:
85+
PLAYWRIGHT_BROWSERS_PATH: .playwright
86+
run: |
87+
make -C test/gui install
88+
python3.10 -m pip list -v
89+
90+
- name: Create GUI test report directory
91+
run: |
92+
mkdir test/gui/guiReportUpload/screenshots -p
93+
chmod 777 test/gui -R
94+
95+
- name: Set squish parameters
96+
run: |
97+
SQUISH_PARAMETERS="--testsuite test/gui \
98+
--reportgen html,test/gui/guiReportUpload \
99+
--envvar QT_LOGGING_RULES=sync.httplogger=true;gui.socketapi=false \
100+
--tags ~@skip \
101+
--tags ~@skipOnLinux"
102+
103+
- name: Run GUI test
104+
env:
105+
LICENSEKEY: ${{ secrets.SQUISH_LICENSEKEY }}
106+
GUI_TEST_REPORT_DIR: test/gui/guiReportUpload
107+
CLIENT_REPO: .
108+
BACKEND_HOST: https://ocis:9200
109+
SECURE_BACKEND_HOST: https://ocis:9200
110+
OCIS: true
111+
SERVER_INI: test/gui/drone/server.server.ini
112+
SQUISH_PARAMETERS: ${{ env.SQUISH_PARAMETERS }}
113+
STACKTRACE_FILE: test/gui/guiReportUpload/stacktrace.log
114+
PLAYWRIGHT_BROWSERS_PATH: .playwright
115+
OWNCLOUD_CORE_DUMP: 1
116+
RECORD_VIDEO_ON_FAILURE: false
117+
# allow to use any available pnpm version
118+
COREPACK_ENABLE_STRICT: 0
119+
run: |
120+
ls -la
121+
ls -la /
122+
ls -la /opt
123+
bash /dockerstartup/entrypoint.sh

0 commit comments

Comments
 (0)