File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 test :
99 runs-on : ubuntu-latest
1010 steps :
11- - uses : actions/checkout@v2
11+ - name : " 🧰 Checkout code"
12+ uses : actions/checkout@v6
13+ - name : " ⚙️ Install Nix"
14+ uses : cachix/install-nix-action@v31
15+ with :
16+ nix_path : nixpkgs=channel:nixos-unstable
17+ - name : " 🔒 Cache dependencies"
18+ uses : cachix/cachix-action@v16
19+ with :
20+ name : devenv
21+ - name : " 🔧 Install devenv.sh"
22+ run : nix profile add nixpkgs#devenv
1223 - name : " ✅ Run tests"
13- run : php ./.github/workflows/scripts/run-tests.php
24+ run : devenv shell "just test"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -euo pipefail
4+
5+ if ! command -v qmltestrunner > /dev/null 2>&1 ; then
6+ printf ' qmltestrunner was not found in PATH\n' >&2
7+ exit 1
8+ fi
9+
10+ shopt -s nullglob
11+ test_directories=(* /tests)
12+ qml_import_arguments=()
13+
14+ if [[ -n " ${QML_TEST_IMPORT_PATH:- } " ]]; then
15+ qml_import_arguments=(-import " $QML_TEST_IMPORT_PATH " )
16+ fi
17+
18+ if (( ${# test_directories[@]} == 0 )) ; then
19+ printf ' No QML tests were found\n'
20+ exit 0
21+ fi
22+
23+ for test_directory in " ${test_directories[@]} " ; do
24+ printf ' Running QML tests in %s\n' " $test_directory "
25+ QT_QPA_PLATFORM=" ${QT_QPA_PLATFORM:- offscreen} " qmltestrunner " ${qml_import_arguments[@]} " -input " $test_directory "
26+ done
Original file line number Diff line number Diff line change 44} :
55
66{
7+ packages = [ pkgs . qt6 . qtdeclarative ] ;
8+ env . QML_TEST_IMPORT_PATH = "${ pkgs . qt6 . qtdeclarative } /lib/qt-6/qml" ;
9+
710 # https://devenv.sh/git-hooks/
811 git-hooks . hooks = {
912 php-cs-fixer = {
Original file line number Diff line number Diff line change @@ -27,3 +27,4 @@ git-apply-patch:
2727[group (' test' )]
2828@ test :
2929 php ./ .github/ workflows/ scripts/ run-tests.php
30+ bash ./ .github/ workflows/ scripts/ run-qml-tests.sh
You can’t perform that action at this time.
0 commit comments