Skip to content

Commit

Permalink
[ci] try running tests in nix-shell
Browse files Browse the repository at this point in the history
  • Loading branch information
ghthor committed Feb 23, 2024
1 parent f12bab7 commit fd4096e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fd4096e

Please sign in to comment.