diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31673f6..4b68e9b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,8 +26,8 @@ jobs: - name: Check GHCup is not present run: "! command -v ghcup" shell: bash - - name: Run unit tests - run: ./test/bats/bin/bats -T test + # - name: Run unit tests + # run: ./test/bats/bin/bats -T test - name: Run integration tests uses: asdf-vm/actions/plugin-test@v3 with: diff --git a/lib/utils.sh b/lib/utils.sh index 9ab2046..b59ed08 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -2,6 +2,9 @@ check_ghcup() { if ! command -v ghcup &> /dev/null then echo "GHCup not found, installing..." - curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | env BOOTSTRAP_HASKELL_NONINTERACTIVE=1 sh + curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | env \ + BOOTSTRAP_HASKELL_NONINTERACTIVE=1 \ + BOOTSTRAP_HASKELL_MINIMAL=1 \ + sh fi } diff --git a/test/install.bats b/test/install.bats index 3769f0d..3202fb3 100644 --- a/test/install.bats +++ b/test/install.bats @@ -3,6 +3,8 @@ setup() { load 'test_helper/bats-assert/load' load 'test_helper/bats-support/load' + DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )" + PATH="$DIR/../bin:$PATH" ASDF_INSTALL_PATH=$(mktemp -dt asdf-XXXX) } @@ -11,7 +13,7 @@ teardown() { } @test "cabal 3.6.2.0" { - source ./bin/install + install ASDF_INSTALL_VERSION="3.6.2.0" main cabal run "${ASDF_INSTALL_PATH}/bin/cabal" --version diff --git a/test/list-all.bats b/test/list-all.bats index d2994a9..9e30c4d 100644 --- a/test/list-all.bats +++ b/test/list-all.bats @@ -3,32 +3,34 @@ setup() { load 'test_helper/bats-assert/load' load 'test_helper/bats-support/load' + DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )" + PATH="$DIR/../bin:$PATH" } @test "cabal" { - source ./bin/list-all + list-all run main cabal assert_success assert_output --partial "3.8.1.0" } -@test "ghc" { - source ./bin/list-all - run main ghc - assert_success - assert_output --partial "9.4.2" -} - -@test "hls" { - source ./bin/list-all - run main hls - assert_success - assert_output --partial "1.7.0.0" -} - -@test "stack" { - source ./bin/list-all - run main stack - assert_success - assert_output --partial "2.7.5" -} +# @test "ghc" { +# source ./bin/list-all +# run main ghc +# assert_success +# assert_output --partial "9.4.2" +# } +# +# @test "hls" { +# source ./bin/list-all +# run main hls +# assert_success +# assert_output --partial "1.7.0.0" +# } +# +# @test "stack" { +# source ./bin/list-all +# run main stack +# assert_success +# assert_output --partial "2.7.5" +# }