ci: group job output, print eval results

Useful for debugging.
This commit is contained in:
Erik Arvstedt 2025-08-11 18:36:28 +02:00
parent 5031e25469
commit 9f8dc58f85
No known key found for this signature in database
GPG key ID: 33312B944DD97846
2 changed files with 13 additions and 1 deletions

View file

@ -22,7 +22,10 @@ jobs:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- id: main
run: nix shell --inputs-from . nixpkgs#{bash,coreutils,cachix} -c ./test/ci/build_test_drivers.sh
name: Build test drivers
run: |
echo "::group::Setup Nix env"
nix shell --inputs-from . nixpkgs#{bash,coreutils,cachix} -c ./test/ci/build_test_drivers.sh
test_scenario:
runs-on: ubuntu-latest

View file

@ -10,11 +10,18 @@ driverDrvs=()
drivers=()
scenarioTests=()
echo '::group::Eval test drivers'
# Call ./test-info.nix
testInfo=$(time nix eval --raw --show-trace ../..#ciTestInfo)
# This sets variables `driverDrvs`, `drivers`, `scenarioTests`
eval "$testInfo"
for i in "${!drivers[@]}"; do
echo "${drivers[$i]}"
echo "${driverDrvs[$i]%^*}"
done
echo '::endgroup::'
if nix path-info --store "https://${cachixCache}.cachix.org" "${scenarioTests[@]}" &>/dev/null; then
echo
echo "All tests have already been built successfully:"
@ -32,6 +39,8 @@ if nix path-info --store "https://${cachixCache}.cachix.org" "${drivers[@]}" &>/
exit 0
fi
echo '::group::Build test drivers'
if [[ -v GITHUB_ACTIONS ]]; then
# Avoid cachix warning message
mkdir -p ~/.config/nix && touch ~/.config/nix/nix.conf