CI: don't use --test-option with older cabal versions (< 3).
This commit is contained in:
parent
36456070c4
commit
dd56822006
1 changed files with 2 additions and 1 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -95,10 +95,11 @@ jobs:
|
||||||
- name: Build and test
|
- name: Build and test
|
||||||
run: |
|
run: |
|
||||||
v2=$([ "${{ matrix.versions.cabal }}" = "2.2" ] && printf 'new' || printf 'v2')
|
v2=$([ "${{ matrix.versions.cabal }}" = "2.2" ] && printf 'new' || printf 'v2')
|
||||||
|
testopts=$([ "${{ matrix.versions.cabal }}" != "2.2" ] && [ "${{ matrix.versions.cabal }}" != "2.4" ] && printf '--test-option=--hide-successes')
|
||||||
cabal $v2-build --enable-tests --disable-optimization 2>&1 | tee build.log
|
cabal $v2-build --enable-tests --disable-optimization 2>&1 | tee build.log
|
||||||
# fail if warnings in local build
|
# fail if warnings in local build
|
||||||
! grep -q ": *[Ww]arning:" build.log || exit 1
|
! grep -q ": *[Ww]arning:" build.log || exit 1
|
||||||
cabal $v2-test --disable-optimization --test-option=--hide-successes
|
cabal $v2-test --disable-optimization $testopts
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue