mirror of
https://github.com/serokell/xrefcheck.git
synced 2024-09-11 13:37:36 +03:00
Problem: we are not testing behavior of xrefcheck on Windows Solution: and add workflow to run golden and tasty tests on CI via github-actions windows runner Some subproblems appear: 1. Problem: CI build fails beacuse it needs `pcre` package Solution: add it (somehow), see `install pacman dependencies` in ci.yml 2. Problem: Network errors displayed different on different platforms Solution: collect output from both and use `assert_diff expected_linux.gold || assert_diff expected_windows.gold` 3: Problem: "Config matches" test is failing because checkout action clone files with CRLF, and test assert equality of two ByteStrings Solution: manually remove CR
25 lines
575 B
Haskell
25 lines
575 B
Haskell
{- SPDX-FileCopyrightText: 2018-2019 Serokell <https://serokell.io>
|
|
-
|
|
- SPDX-License-Identifier: MPL-2.0
|
|
-}
|
|
|
|
module Main where
|
|
|
|
import Universum
|
|
|
|
import Main.Utf8 (withUtf8)
|
|
import System.IO.CodePage (withCP65001)
|
|
|
|
import Xrefcheck.CLI (Command (..), getCommand)
|
|
import Xrefcheck.Command (defaultAction)
|
|
import Xrefcheck.Config (defConfigText)
|
|
|
|
main :: IO ()
|
|
main = withUtf8 $ withCP65001 $ do
|
|
command <- getCommand
|
|
case command of
|
|
DefaultCommand options ->
|
|
defaultAction options
|
|
DumpConfig repoType path ->
|
|
writeFile path (defConfigText repoType)
|