File tree Expand file tree Collapse file tree 5 files changed +14
-8
lines changed
1336-1337-new-package-names
3850-cached-templates-network-errors Expand file tree Collapse file tree 5 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -23,18 +23,21 @@ jobs:
23
23
include :
24
24
- os : ubuntu-latest
25
25
release-args : " --alpine"
26
+ cache-bust : " "
26
27
- os : windows-latest
27
28
release-args : " "
29
+ cache-bust : " "
28
30
- os : macos-latest
29
31
release-args : " "
32
+ cache-bust : " 1"
30
33
steps :
31
34
- name : Clone project
32
35
uses : actions/checkout@v2
33
36
- name : Cache dependencies
34
37
uses : actions/cache@v1
35
38
with :
36
39
path : ~/.stack
37
- key : ${{ runner.os }}-${{ hashFiles('stack.yaml') }}
40
+ key : ${{ runner.os }}-${{ hashFiles('stack.yaml') }}${{ matrix.cache-bust }}
38
41
- shell : bash
39
42
name : Install deps and run checks
40
43
run : |
Original file line number Diff line number Diff line change @@ -252,6 +252,9 @@ exeExt = if isWindows then ".exe" else ""
252
252
isWindows :: Bool
253
253
isWindows = os == " mingw32"
254
254
255
+ isLinux :: Bool
256
+ isLinux = os == " linux"
257
+
255
258
-- | Is the OS Alpine Linux?
256
259
getIsAlpine :: IO Bool
257
260
getIsAlpine = doesFileExist " /etc/alpine-release"
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ main :: IO ()
8
8
main =
9
9
if isWindows
10
10
then logInfo " Disabled on Windows (see https://github.com/commercialhaskell/stack/issues/1337#issuecomment-166118678)"
11
- else do
11
+ else when isLinux $ do
12
12
safeNew " 1234a-4b-b4-abc-12b34"
13
13
doesExist " ./1234a-4b-b4-abc-12b34/stack.yaml"
14
14
stackErr [" new" , " 1234-abc" ]
Original file line number Diff line number Diff line change 1
1
import StackTest
2
- import Control.Monad (unless )
2
+ import Control.Monad (when , unless )
3
3
import Data.List (isInfixOf )
4
4
import Data.Maybe (fromMaybe )
5
5
import System.Directory
6
6
import System.Environment (lookupEnv , setEnv )
7
7
import System.FilePath
8
8
9
9
main :: IO ()
10
- main = do
10
+ main = when isLinux $ do
11
11
performCachingTest templateUrl
12
12
performCachingTest githubTemplate
13
13
where
@@ -19,7 +19,7 @@ main = do
19
19
removeDirectoryRecursive " tmp"
20
20
setEnv " HTTPS_PROXY" " http://sdsgsfgslfgsjflgkjs" -- make https requests fail
21
21
stackCheckStderr arguments $ \ stderr ->
22
- unless (" Using cached local version" `isInfixOf` stderr)
22
+ unless (" Using cached local version" `isInfixOf` stderr)
23
23
(error " stack didn't load the cached template" )
24
24
25
25
removeDirectoryRecursive " tmp"
@@ -31,7 +31,7 @@ main = do
31
31
templateUrl :: String
32
32
templateUrl =
33
33
" https://raw.githubusercontent.com/commercialhaskell/stack-templates/986836cc85b0c8c5bbb78d7b94347ba095089b03/tasty-discover.hsfiles"
34
-
34
+
35
35
-- the same template, cached differently
36
36
githubTemplate :: String
37
37
githubTemplate = " github:commercialhaskell/tasty-discover.hsfiles"
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ import System.Exit (exitFailure)
4
4
import System.FilePath ((</>) )
5
5
import Data.List (filter )
6
6
import System.IO (hPutStrLn , withFile , IOMode (.. ))
7
- import Control.Monad (unless )
7
+ import Control.Monad (when )
8
8
9
9
main :: IO ()
10
- main = unless isWindows $ do
10
+ main = when isLinux $ do
11
11
let
12
12
gitInit = do
13
13
runShell " git init ."
You can’t perform that action at this time.
0 commit comments