run testsuite in CI

This commit is contained in:
Jens Petersen 2019-08-14 18:15:25 +02:00
parent 6e408f4b82
commit 6d27e4088a
3 changed files with 35 additions and 5 deletions

View File

@ -83,11 +83,10 @@ This package provides the Haskell %{pkg_name} profiling library.
# End cabal-rpm setup
#remove the copy library
rm -r cbits
%if %{with tests}
cabal-tweak-remove-upperbound tasty
cabal-tweak-remove-upperbound tasty-hunit
cabal-tweak-remove-upperbound tasty-quickcheck
%endif
# upperbounds
cabal-tweak-dep-ver tasty '< 0.12' '< 1.3'
cabal-tweak-dep-ver tasty-hunit '< 0.10' '< 0.11'
cabal-tweak-dep-ver tasty-quickcheck '== 0.8.*' '> 0.8'
%build

11
tests/simple/runtest.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/sh
set -ex
SOURCEDIR=$1
cd "${SOURCEDIR}" || exit 1
cabal update
cabal install --enable-tests --only-dependencies
cabal test

20
tests/tests.yaml Normal file
View File

@ -0,0 +1,20 @@
---
- hosts: localhost
roles:
- role: standard-test-source
tags:
- classic
- role: standard-test-basic
tags:
- classic
required_packages:
- cabal-install
- ghc-tasty-hunit-devel
- ghc-tasty-quickcheck-devel
- ghc-zlib-devel
tests:
- simple:
dir: simple
run: ./runtest.sh {{ tenv_workdir }}/source/
...