Skip to content

Commit

Permalink
Pass arguments from stack/cabal test to goldplate
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Jul 1, 2024
1 parent c195287 commit 2581828
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
stack-version: ${{ matrix.stack }}
ghc-version: ${{ matrix.ghc }}

- name: Restore ~/.stack
- name: Restore cache
uses: actions/cache/restore@v3
id: cache
with:
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Build
run: ${STACK} build

- name: Cache ~/.stack
- name: Save cache
uses: actions/cache/save@v3
# Reevaluate key.
env:
Expand All @@ -66,7 +66,7 @@ jobs:
# continue-on-error: true

- name: Test
run: ${STACK} test
run: ${STACK} test --test-arguments --diff

- name: Get goldplate version
run: |
Expand Down
9 changes: 7 additions & 2 deletions tests/Tests.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{-# LANGUAGE OverloadedStrings #-}

module Main (main) where

import qualified Data.Aeson as A
import Data.ByteString.Char8 ()
import qualified Data.List as List
import Goldplate (Assert)
import System.Environment (getArgs)
import System.Exit (exitWith)
import System.Process (system)

Expand All @@ -19,5 +22,7 @@ testAssertMultipleDiscriminator =

main :: IO ()
main = do
testAssertMultipleDiscriminator
exitWith =<< system ("goldplate tests")
testAssertMultipleDiscriminator
args <- getArgs
exitWith =<< do
system $ unwords $ "goldplate tests" : args

0 comments on commit 2581828

Please sign in to comment.