mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-28 20:38:12 +08:00
[Ubuntu] Implement new directories hierarchy (#8627)
This commit is contained in:
committed by
GitHub
parent
d1f2c9a3be
commit
5d40b1e213
38
images/ubuntu/scripts/tests/Haskell.Tests.ps1
Normal file
38
images/ubuntu/scripts/tests/Haskell.Tests.ps1
Normal file
@@ -0,0 +1,38 @@
|
||||
Describe "Haskell" {
|
||||
$GHCCommonPath = "/usr/local/.ghcup/ghc"
|
||||
$GHCVersions = Get-ChildItem -Path $GHCCommonPath | Where-Object { $_.Name -match "\d+\.\d+" }
|
||||
|
||||
$testCase = @{ GHCVersions = $GHCVersions }
|
||||
|
||||
It "GHC directory contains two version of GHC" -TestCases $testCase {
|
||||
param ([object] $GHCVersions)
|
||||
$GHCVersions.Count | Should -Be 2
|
||||
}
|
||||
|
||||
$testCases = $GHCVersions | ForEach-Object { @{ GHCPath = "${_}/bin/ghc"} }
|
||||
|
||||
It "GHC version <GHCPath>" -TestCases $testCases {
|
||||
param ([string] $GHCPath)
|
||||
"$GHCPath --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "GHCup" {
|
||||
"ghcup --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Default GHC" {
|
||||
"ghc --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Cabal" {
|
||||
"cabal --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Stack" {
|
||||
"stack --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Stack hook is not installed" {
|
||||
"$HOME/.stack/hooks/ghc-install.sh" | Should -Not -Exist
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user