[neon/snap-packaging/kcalc6/daspood-selenium] /: Update .gitlab-ci.yml
Carlos De Maine
null at kde.org
Tue May 28 04:57:02 BST 2024
Git commit 2ab3c14da4605ac1c2e344988729c8ee726a739e by Carlos De Maine.
Committed on 28/05/2024 at 03:57.
Pushed by carlosdem into branch 'daspood-selenium'.
Update .gitlab-ci.yml
M +50 -0 .gitlab-ci.yml
https://invent.kde.org/neon/snap-packaging/kcalc6/-/commit/2ab3c14da4605ac1c2e344988729c8ee726a739e
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e5daaa5..e268fb7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,3 +5,53 @@ include:
- project: sysadmin/ci-utilities
file:
- /gitlab-templates/snap-snapcraft-lxd.yml
+
+# SPDX-FileCopyrightText: None
+# SPDX-License-Identifier: CC0-1.0
+
+snap_selenium_testing:
+ extends: .snap_base #snap_snapcraft_lxd
+ inherit:
+ default: true
+ stage: test
+ script:
+ # Install selenium deps
+ - |
+ sudo apt install -y cmake gcc g++ git ruby dh-python dh-virtualenv debhelper-compat \
+ python3-pip python3-all-dev python3-pyatspi python3-cairo python3-gi-cairo python3-virtualenv \
+ accerciser at-spi2-core gobject-introspection \
+ libgirepository1.0-dev plasma-wayland-protocols libcairo2-dev libpipewire-0.3-dev \
+ libgirepository-1.0-1 libcairo2 \
+ pkg-kde-tools-neon kf6-extra-cmake-modules kf6-kcoreaddons-dev kf6-kwindowsystem-dev kwayland6-dev \
+ qt6-base-dev qt6-base-private-dev qt6-wayland-dev libkpipewire-dev \
+ kf6-kcoreaddons kf6-kwindowsystem kwayland6 qt6-base qt6-wayland libqt6core6 libqt6dbus6 \
+ libqt6waylandclient6 libkpipewire6
+ # Install selenium wrapper
+ - |
+ export RESTORE_DIR=`pwd` \
+ && cd /tmp \
+ && git clone https://invent.kde.org/sdk/selenium-webdriver-at-spi.git \
+ && cd selenium-webdriver-at-spi \
+ && virtualenv --system-site-packages venv \ # --system-site-packages required for pyatspi to be detected
+ && source venv/bin/activate \
+ && pip3 install -r requirements.txt \
+ && echo export PATH="~/.local/bin:$PATH" >> ${HOME}/.bashrc \
+ && mkdir build \
+ && cd build \
+ && cmake -DQT_MAJOR_VERSION=6 -DBUILD_WITH_QT6=ON .. \
+ && make \
+ && sudo make install # sudo required to copy the files to /usr
+ && cd $RESTORE_DIR
+ # Install snap from artefacts
+ - |
+ snap install kf6-core22 \
+ && sudo snap install --dangerous $CI_PROJECT_DIR/.kde-ci-packages/*.snap \
+ && sudo snap connect "$KDE_SNAP_MODULE_NAME":kf6-core22 kf6-core22:kf6-core22
+ # Run selenium tests
+ - |
+ for testfile in ./uitests/*test*.*; do # "You can write tests in any language you want" -> accept all extensions
+ chmod +x $testfile
+ selenium-webdriver-at-spi-run $testfile || exit 1
+ done
+ allow_failure: true
+ interruptible: true
More information about the Neon-commits
mailing list