Skip to content

Commit e1737a4

Browse files
authored
Merge pull request #5 from codewars/use-stack
2 parents ba3a09d + abb4ce8 commit e1737a4

File tree

11 files changed

+212
-83
lines changed

11 files changed

+212
-83
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Workaround runner image issue
19+
# https://github.com/actions/runner-images/issues/7061
20+
run: sudo chown -R $USER /usr/local/.ghcup
21+
22+
- uses: haskell/actions/setup@v2
23+
with:
24+
enable-stack: true
25+
26+
- run: stack build
27+
- run: stack test

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ cabal.project.local
2323
cabal.project.local~
2424
.HTF/
2525
.ghc.environment.*
26+
.stack-work/
27+
*~
File renamed without changes.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ main = hspecWith defaultConfig {configFormatter = Just codewars} Spec.spec
2727
## Development
2828

2929
```shell
30-
cabal install
31-
cabal test
30+
stack build
31+
stack test
3232
```

cabal.project.freeze

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

hspec-formatters-codewars.cabal

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,54 @@
1-
cabal-version: 2.4
2-
name: hspec-formatters-codewars
3-
version: 0.2.0
4-
synopsis: Hspec formatter for Codewars
5-
homepage: https://github.com/codewars/hspec-formatters-codewars
6-
license: MIT
7-
build-type: Simple
1+
cabal-version: 1.12
82

9-
library
10-
hs-source-dirs: src
11-
build-depends:
12-
, base >=4 && <5
13-
, hspec >=2.8 && <3
14-
, hspec-core >=2.8 && <3
15-
, text >=2 && <3
3+
-- This file has been generated from package.yaml by hpack version 0.35.0.
4+
--
5+
-- see: https://github.com/sol/hpack
166

17-
exposed-modules: Test.Hspec.Formatters.Codewars
18-
default-language: GHC2021
7+
name: hspec-formatters-codewars
8+
version: 0.2.0
9+
synopsis: Hspec formatter for Codewars
10+
description: Please see the README on GitHub at <https://github.com/codewars/hspec-formatters-codewars#readme>
11+
homepage: https://github.com/codewars/hspec-formatters-codewars#readme
12+
bug-reports: https://github.com/codewars/hspec-formatters-codewars/issues
13+
license: MIT
14+
license-file: LICENSE
15+
build-type: Simple
16+
extra-source-files:
17+
README.md
1918

20-
test-suite hspec-formatters-codewars-spec
21-
type: exitcode-stdio-1.0
22-
default-language: GHC2021
23-
main-is: Main.hs
24-
hs-source-dirs: test src
25-
build-depends:
26-
, base >=4 && <5
27-
, hspec >=2.8 && <3
28-
, hspec-core >=2.8 && <3
29-
, text >=2 && <3
19+
source-repository head
20+
type: git
21+
location: https://github.com/codewars/hspec-formatters-codewars
3022

23+
library
24+
exposed-modules:
25+
Test.Hspec.Formatters.Codewars
3126
other-modules:
32-
Spec
33-
Spec.ExampleSpec
34-
Test.Hspec.Formatters.Codewars
27+
Paths_hspec_formatters_codewars
28+
hs-source-dirs:
29+
src
30+
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints
31+
build-depends:
32+
base >=4.7 && <5
33+
, hspec-core >=2.8
34+
, text
35+
default-language: Haskell2010
3536

36-
build-tool-depends: hspec-discover:hspec-discover >=2 && <3
37+
test-suite hspec-formatters-codewars-test
38+
type: exitcode-stdio-1.0
39+
main-is: Main.hs
40+
other-modules:
41+
ExampleSpec
42+
Spec
43+
Paths_hspec_formatters_codewars
44+
hs-source-dirs:
45+
test
46+
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
47+
build-depends:
48+
base >=4.7 && <5
49+
, hspec >=2.8
50+
, hspec-core >=2.8
51+
, hspec-formatters-codewars
52+
, text
53+
default-language: Haskell2010
54+
build-tool-depends: hspec-discover:hspec-discover

package.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: hspec-formatters-codewars
2+
version: 0.2.0
3+
github: "codewars/hspec-formatters-codewars"
4+
license: MIT
5+
synopsis: Hspec formatter for Codewars
6+
7+
extra-source-files:
8+
- README.md
9+
10+
# Metadata used when publishing your package
11+
# synopsis: Short description of your package
12+
# category: Web
13+
14+
# To avoid duplicated efforts in documentation and dealing with the
15+
# complications of embedding Haddock markup inside cabal files, it is
16+
# common to point users to the README.md file.
17+
description: Please see the README on GitHub at <https://github.com/codewars/hspec-formatters-codewars#readme>
18+
19+
dependencies:
20+
- base >= 4.7 && < 5
21+
- hspec-core >= 2.8
22+
- text
23+
24+
ghc-options:
25+
- -Wall
26+
- -Wcompat
27+
- -Widentities
28+
- -Wincomplete-record-updates
29+
- -Wincomplete-uni-patterns
30+
- -Wmissing-export-lists
31+
- -Wmissing-home-modules
32+
- -Wpartial-fields
33+
- -Wredundant-constraints
34+
35+
library:
36+
source-dirs: src
37+
38+
tests:
39+
hspec-formatters-codewars-test:
40+
main: Main.hs
41+
source-dirs: test
42+
ghc-options:
43+
- -threaded
44+
- -rtsopts
45+
- -with-rtsopts=-N
46+
dependencies:
47+
- base >= 4.7 && < 5
48+
- hspec >= 2.8
49+
- hspec-core >= 2.8
50+
- hspec-formatters-codewars
51+
verbatim:
52+
build-tool-depends:
53+
hspec-discover:hspec-discover

stack.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# This file was automatically generated by 'stack init'
2+
#
3+
# Some commonly used options have been documented as comments in this file.
4+
# For advanced use and comprehensive documentation of the format, please see:
5+
# https://docs.haskellstack.org/en/stable/yaml_configuration/
6+
7+
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
8+
# A snapshot resolver dictates the compiler version and the set of packages
9+
# to be used for project dependencies. For example:
10+
#
11+
# resolver: lts-3.5
12+
# resolver: nightly-2015-09-21
13+
# resolver: ghc-7.10.2
14+
#
15+
# The location of a snapshot can be provided as a file or url. Stack assumes
16+
# a snapshot provided as a file might change, whereas a url resource does not.
17+
#
18+
# resolver: ./custom-snapshot.yaml
19+
# resolver: https://example.com/snapshots/2018-01-01.yaml
20+
resolver: lts-20.10
21+
22+
# User packages to be built.
23+
# Various formats can be used as shown in the example below.
24+
#
25+
# packages:
26+
# - some-directory
27+
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
28+
# subdirs:
29+
# - auto-update
30+
# - wai
31+
packages:
32+
- .
33+
# Dependency packages to be pulled from upstream that are not in the resolver.
34+
# These entries can reference officially published versions as well as
35+
# forks / in-progress versions pinned to a git hash. For example:
36+
#
37+
# extra-deps:
38+
# - acme-missiles-0.3
39+
# - git: https://github.com/commercialhaskell/stack.git
40+
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
41+
#
42+
# extra-deps: []
43+
44+
# Override default flag values for local packages and extra-deps
45+
# flags: {}
46+
47+
# Extra package databases containing global packages
48+
# extra-package-dbs: []
49+
50+
# Control whether we use the GHC we find on the path
51+
# system-ghc: true
52+
#
53+
# Require a specific version of stack, using version ranges
54+
# require-stack-version: -any # Default
55+
# require-stack-version: ">=2.7"
56+
#
57+
# Override the architecture used by stack, especially useful on Windows
58+
# arch: i386
59+
# arch: x86_64
60+
#
61+
# Extra directories used by stack for building
62+
# extra-include-dirs: [/path/to/dir]
63+
# extra-lib-dirs: [/path/to/dir]
64+
#
65+
# Allow a newer minor version of GHC than the snapshot specifies
66+
# compiler-check: newer-minor

stack.yaml.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was autogenerated by Stack.
2+
# You should not edit this file by hand.
3+
# For more information, please see the documentation at:
4+
# https://docs.haskellstack.org/en/stable/lock_files
5+
6+
packages: []
7+
snapshots:
8+
- completed:
9+
sha256: 17870c63f8041ac17a38096124abeb953cb14d84bfc96deb88f9b24daa97b347
10+
size: 649332
11+
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/10.yaml
12+
original: lts-20.10
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Spec.ExampleSpec where
1+
module ExampleSpec where
22

33
import Test.Hspec
44

0 commit comments

Comments
 (0)