Skip to content

Commit

Permalink
Add .github/workflows/cabal-doctest.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sol committed Jul 12, 2024
1 parent b959db6 commit 38111e8
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 58 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/cabal-doctest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: cabal-doctest

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: 0 0 * * *

jobs:
cabal-doctest:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-12
- windows-latest

steps:
- uses: actions/checkout@v3

- run: ghcup install cabal latest --set
if: matrix.os == 'macos-12'

- run: cabal --version
- run: cabal update
- run: cabal install
- run: cabal doctest
37 changes: 11 additions & 26 deletions doctest.cabal

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
71 changes: 39 additions & 32 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |
Documentation is at <https://github.com/sol/doctest#readme>.
category: Testing
copyright: (c) 2009-2023 Simon Hengel
copyright: (c) 2009-2024 Simon Hengel
author: Simon Hengel <[email protected]>
maintainer: Simon Hengel <[email protected]>

Expand All @@ -33,45 +33,51 @@ extra-source-files:
ghc-options: -Wall

when:
- condition: impl(ghc >= 8.10)
ghc-options: -fwarn-unused-packages

- condition: impl(ghc >= 9.8)
ghc-options: -fno-warn-x-partial

dependencies:
- base >= 4.5 && < 5
- ghc >= 8.0 && < 9.12
- syb >= 0.3
- code-page >= 0.1
- deepseq
- directory
- exceptions
- filepath
- process
- ghc-paths >= 0.1.0.9
- transformers
- base >= 4.5 && < 5

library:
source-dirs:
- src
- src
exposed-modules:
- Test.DocTest
- Test.DocTest.Internal.Extract
- Test.DocTest.Internal.Location
- Test.DocTest.Internal.Parse
- Test.DocTest.Internal.Run
- Test.DocTest
- Test.DocTest.Internal.Extract
- Test.DocTest.Internal.Location
- Test.DocTest.Internal.Parse
- Test.DocTest.Internal.Run

dependencies: &dependencies
ghc: ">= 8.0 && < 9.12"
syb: ">= 0.3"
code-page: ">= 0.1"
deepseq:
directory:
exceptions:
filepath:
process:
ghc-paths: ">= 0.1.0.9"
transformers:

executables:
doctest:
main: Main.hs
main: driver/doctest.hs
ghc-options: -threaded
source-dirs: driver
dependencies: doctest
dependencies:
- doctest

cabal-doctest:
main: cabal-doctest.hs
main: driver/cabal-doctest.hs
ghc-options: -threaded
source-dirs: driver
dependencies:
- temporary
- process
- filepath
- temporary

tests:
spec:
Expand All @@ -84,11 +90,12 @@ tests:
- src
c-sources: test/integration/with-cbits/foo.c
dependencies:
- HUnit
- hspec >= 2.3.0
- hspec-core >= 2.3.0
- QuickCheck >= 2.13.1
- stringbuilder >= 0.4
- silently >= 1.2.4
- setenv
- mockery
<<: *dependencies
HUnit:
hspec: ">= 2.3.0"
hspec-core: ">= 2.3.0"
QuickCheck: ">= 2.13.1"
stringbuilder: ">= 0.4"
silently: ">= 1.2.4"
setenv:
mockery:

0 comments on commit 38111e8

Please sign in to comment.