Skip to content

Commit c56e516

Browse files
committed
Improve doctest setup
1 parent dc5695b commit c56e516

File tree

5 files changed

+49
-59
lines changed

5 files changed

+49
-59
lines changed

.github/workflows/haskell.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/on-push.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Run Tests
2+
3+
on: [push]
4+
5+
jobs:
6+
cabal:
7+
runs-on: ubuntu-22.04
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Cache Cabal dir
11+
uses: actions/cache@v3
12+
with:
13+
path: ~/.cabal
14+
key: ${{ runner.os }}-cabal-${{ hashFiles('*.cabal') }}
15+
restore-keys: ${{ runner.os }}-cabal-
16+
17+
- run: cabal test
18+
- run: cabal repl --with-ghc=doctest --ghc-options="-XQuasiQuotes -XOverloadedStrings"
19+
20+
stackage:
21+
runs-on: ubuntu-22.04
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
resolver:
26+
- 'lts'
27+
- 'lts-10'
28+
- 'lts-11'
29+
- 'lts-12'
30+
- 'lts-13'
31+
- 'lts-14'
32+
- 'lts-15'
33+
- 'lts-16'
34+
- 'lts-17'
35+
- 'lts-18'
36+
- 'lts-19'
37+
- 'lts-20'
38+
39+
steps:
40+
- uses: actions/checkout@v2
41+
- name: Cache stack dir
42+
uses: actions/cache@v3
43+
with:
44+
path: ~/.stack
45+
key: ${{ runner.os }}-stack-${{ matrix.resolver }}-${{ hashFiles('*.cabal') }}
46+
restore-keys: ${{ runner.os }}-stack-${{ matrix.resolver }}-
47+
48+
- run: stack test --haddock --no-terminal --resolver ${{ matrix.resolver }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.cabal-sandbox/
22
cabal.sandbox.config
33
dist/
4+
dist-newstyle/
45
.stack-work/
56
.vscode/
67

email-validate.cabal

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,3 @@ test-suite Main
4747
hspec >= 2.2.3 && < 2.11,
4848
QuickCheck >= 2.4 && < 2.15,
4949
bytestring >= 0.9 && < 0.12
50-
51-
test-suite doctests
52-
type: exitcode-stdio-1.0
53-
ghc-options: -threaded
54-
default-language: Haskell2010
55-
hs-source-dirs: tests
56-
main-is: doctests.hs
57-
build-depends:
58-
base >= 4 && < 5,
59-
doctest >= 0.8 && < 0.21

tests/doctests.hs

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)