From fd4096ed98e03a5552b01b06662046f153a275a1 Mon Sep 17 00:00:00 2001 From: Will Owens Date: Fri, 23 Feb 2024 03:29:39 -0500 Subject: [PATCH] [ci] try running tests in nix-shell --- .github/workflows/test.yml | 11 +++++++++-- run_tests.sh | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70d75dd..9a34352 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,5 +26,12 @@ jobs: - uses: cachix/install-nix-action@v25 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - - run: nix build - - run: nix flake check + nix_path: nixpkgs=channel:nixos-unstable + - run: | + git config --global init.defaultBranch master + git config --global user.name scm_breeze@scm_breeze + git config --global user.email "SCM Breeze" + - run: nix-shell -p bash zsh --run ./run_tests.sh + # - run: nix-shell -p shunit2 -i ./run_tests.sh + # - run: nix build + # - run: nix flake check diff --git a/run_tests.sh b/run_tests.sh index c0a3149..ab29061 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -10,11 +10,12 @@ if [ -z "$TEST_SHELLS" ]; then fi echo "== Will run all tests with following shells: ${TEST_SHELLS}" -cd -P -- "${0%/*}" # Change to directory this script lives in +cd -P -- "${0%/*}" # Change to directory this script lives in for test in $(find test/lib -name *_test.sh); do for shell in $TEST_SHELLS; do echo "== Running tests with [$shell]: $test" $shell $test || failed=true + printf '==\n\n' done done