ci: group job output, print eval results
Useful for debugging.
This commit is contained in:
parent
5031e25469
commit
9f8dc58f85
2 changed files with 13 additions and 1 deletions
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
|
|
@ -22,7 +22,10 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: cachix/install-nix-action@v31
|
- uses: cachix/install-nix-action@v31
|
||||||
- id: main
|
- 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:
|
test_scenario:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,18 @@ driverDrvs=()
|
||||||
drivers=()
|
drivers=()
|
||||||
scenarioTests=()
|
scenarioTests=()
|
||||||
|
|
||||||
|
echo '::group::Eval test drivers'
|
||||||
# Call ./test-info.nix
|
# Call ./test-info.nix
|
||||||
testInfo=$(time nix eval --raw --show-trace ../..#ciTestInfo)
|
testInfo=$(time nix eval --raw --show-trace ../..#ciTestInfo)
|
||||||
# This sets variables `driverDrvs`, `drivers`, `scenarioTests`
|
# This sets variables `driverDrvs`, `drivers`, `scenarioTests`
|
||||||
eval "$testInfo"
|
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
|
if nix path-info --store "https://${cachixCache}.cachix.org" "${scenarioTests[@]}" &>/dev/null; then
|
||||||
echo
|
echo
|
||||||
echo "All tests have already been built successfully:"
|
echo "All tests have already been built successfully:"
|
||||||
|
|
@ -32,6 +39,8 @@ if nix path-info --store "https://${cachixCache}.cachix.org" "${drivers[@]}" &>/
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo '::group::Build test drivers'
|
||||||
|
|
||||||
if [[ -v GITHUB_ACTIONS ]]; then
|
if [[ -v GITHUB_ACTIONS ]]; then
|
||||||
# Avoid cachix warning message
|
# Avoid cachix warning message
|
||||||
mkdir -p ~/.config/nix && touch ~/.config/nix/nix.conf
|
mkdir -p ~/.config/nix && touch ~/.config/nix/nix.conf
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue