From 3c18c99b0110306df939f5840e582543193a2c81 Mon Sep 17 00:00:00 2001 From: Daniel Teichmann Date: Tue, 10 Aug 2021 14:58:48 +0200 Subject: .gitlab-ci.yml: Add test stage and test job. --- .gitlab-ci.yml | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c6e898e..560d777 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,21 +3,31 @@ image: darkmattercoder/qt-build:latest stages: - Build - - Run + - Test +# - Run RWA:Build: stage: Build script: - - apt update && apt -y install make autoconf - - qmake rwa-support-desktopapp.pro - - make + - pwd + # list all files in whole git repo + - echo "List all files:" + - find ../ + - sudo apt update && sudo apt -y install make autoconf + - mkdir build && cd build + - qmake ../rwa-support-desktop.pro + - make -j4 + # list all files in whole git repo + - echo "All files including artifacts "rwa-support-desktopapp" and "tests" binaries:" + - find ../ artifacts: paths: - - rwa-support-desktopapp - expire_in: 2 weeks + - build/tests/tests + - build/rwa-support-desktopapp/rwa-support-desktopapp + expire_in: 1 weeks # Disabled because running the application would give an error -# since there are no X.Org server, Wayland or other display servers available +# since there is no X.Org server, Wayland or other display server available # RWA:Run: # stage: Run # script: @@ -25,14 +35,16 @@ RWA:Build: # - find # - echo "Executing rwa-support-desktopapp" # - ./rwa-support-desktopapp -# dependencies: -# - RWA:Build +# needs: ["RWA:Build"] -# To be implemented. -# RWA:Test: -# stage: Test -# script: -# - echo "All files in git repo + artifact 'rwa-support-desktopapp':" -# - find -# dependencies: -# - Build:Code +RWA:Test: + stage: Test + script: + - sudo apt update && sudo apt -y install xvfb + - pwd + # list all files in whole git repo + - echo "All files:" + - find + - cd build/tests + - xvfb-run ./tests + needs: ["RWA:Build"] -- cgit v1.2.3