mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 15:20:11 +00:00
[Ubuntu] Move Haskell tests to separate file. (#2348)
* Move Haskell tests to separate file * Minor fix
This commit is contained in:
committed by
GitHub
parent
c86fcd37ee
commit
82b4e13fb0
31
images/linux/scripts/tests/Haskell.Tests.ps1
Normal file
31
images/linux/scripts/tests/Haskell.Tests.ps1
Normal file
@@ -0,0 +1,31 @@
|
||||
Describe "Haskell" {
|
||||
|
||||
$GHCCommonPath = "/opt/ghc"
|
||||
$GHCVersions = Get-ChildItem -Path $GHCCommonPath | Where-Object { $_.Name -match "\d+\.\d+" }
|
||||
|
||||
$testCase = @{ GHCVersions = $GHCVersions }
|
||||
|
||||
It "GHC directory contains three version of GHC" -TestCases $testCase {
|
||||
param ([object] $GHCVersions)
|
||||
$GHCVersions.Count | Should -Be 3
|
||||
}
|
||||
|
||||
$testCases = $GHCVersions | ForEach-Object { @{ GHCPath = "${_}/bin/ghc"} }
|
||||
|
||||
It "GHC version <GHCPath>" -TestCases $testCases {
|
||||
param ([string] $GHCPath)
|
||||
"$GHCPath --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Default GHC" {
|
||||
"ghc --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Cabal" {
|
||||
"cabal --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Stack" {
|
||||
"stack --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user