File tree Expand file tree Collapse file tree 9 files changed +106
-46
lines changed Expand file tree Collapse file tree 9 files changed +106
-46
lines changed Original file line number Diff line number Diff line change @@ -6,17 +6,13 @@ RUN set -ex; \
6
6
chown -R codewarrior: /workspace;
7
7
8
8
RUN set -ex; \
9
- curl -sL https://deb.nodesource.com/setup_8 .x | bash -; \
9
+ curl -sL https://deb.nodesource.com/setup_16 .x | bash -; \
10
10
apt-get install -y nodejs; \
11
11
apt-get clean; \
12
12
rm -rf /var/lib/apt/lists/* /tmp/*;
13
13
14
- RUN set -ex; \
15
- mkdir -p /opt/purescript; \
16
- curl -fsSL https://github.com/purescript/purescript/releases/download/v0.12.2/linux64.tar.gz | tar xz -C /opt/purescript --strip-components=1; \
17
- curl -fsSL https://github.com/purescript/psc-package/releases/download/v0.5.1/linux64.tar.gz | tar xz -C /opt/purescript --strip-components=1;
18
-
19
- RUN npm install -g pulp@12.3.1;
14
+ RUN npm install -g purescript@0.15.4;
15
+ RUN npm install -g spago@0.20.9;
20
16
21
17
COPY --chown=codewarrior:codewarrior workspace/ /workspace
22
18
WORKDIR /workspace
@@ -28,20 +24,15 @@ ENV USER=codewarrior \
28
24
PATH=/opt/purescript:$PATH
29
25
30
26
RUN set -ex; \
31
- # TODO Properly package the reporter and install
32
- mkdir /tmp/reporter; \
33
- curl -fsSL https://github.com/codewars/purescript-spec-reporter-codewars/archive/refs/tags/v0.0.1.tar.gz | tar xz -C /tmp/reporter --strip-components=1; \
34
- mv /tmp/reporter/src/Test /workspace/src/Test; \
35
- rm -rf /tmp/reporter; \
36
27
cd /workspace; \
37
28
npm install; \
38
- # install packages
39
- psc-package install; \
40
- # compile packages
41
- psc-package build; \
42
- # ensure running `Main.purs` works
43
- pulp run; \
44
- # ensure testing works
45
- pulp test || true; \
46
- # clean up
29
+ # install packages
30
+ spago install; \
31
+ # compile packages
32
+ spago build; \
33
+ # ensure running `Main.purs` works
34
+ spago run; \
35
+ # ensure testing works
36
+ spago test || true; \
37
+ # clean up
47
38
rm -rf ./src/Main.purs ./output/Main/ ./test/Example/ ./output/Example.ExampleSpec/;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Container image for PureScript
7
7
``` bash
8
8
W=/workspace
9
9
# Create container
10
- C=$( docker container create --rm -w $W ghcr.io/codewars/purescript:latest pulp test)
10
+ C=$( docker container create --rm -w $W ghcr.io/codewars/purescript:latest spago test)
11
11
12
12
# Copy files from the examples directory
13
13
docker container cp ./examples/passing/. $C :$W
Original file line number Diff line number Diff line change 8
8
W=/workspace
9
9
10
10
# Create container
11
- C=$( docker container create --rm -w $W $IMAGE pulp test)
11
+ C=$( docker container create --rm -w $W $IMAGE spago test)
12
12
13
13
# Copy files from the examples directory
14
14
docker container cp examples/${1:- passing} /. $C :$W
Original file line number Diff line number Diff line change
1
+ /bower_components /
2
+ /node_modules /
3
+ /.pulp-cache /
4
+ /output /
5
+ /generated-docs /
6
+ /.psc-package /
7
+ /.psc *
8
+ /.purs *
9
+ /.psa *
10
+ /.spago
Original file line number Diff line number Diff line change
1
+ let upstream =
2
+ https:// github. com/ purescript/ package- sets/ releases/ download/ psc- 0.15 . 4 - 20220901 / packages. dhall
3
+ sha256: f1531b29c21ac437ffe5666c1b6cc76f0a9c29d3c9d107ff047aa2567744994f
4
+
5
+ let additions =
6
+ { spec- reporter- codewars =
7
+ { repo = " https://github.com/codewars/purescript-spec-reporter-codewars"
8
+ , version = " v0.2.0"
9
+ , dependencies =
10
+ [ " aff"
11
+ , " bigints"
12
+ , " console"
13
+ , " datetime"
14
+ , " debug"
15
+ , " effect"
16
+ , " exceptions"
17
+ , " foldable-traversable"
18
+ , " maybe"
19
+ , " prelude"
20
+ , " profunctor-lenses"
21
+ , " quickcheck"
22
+ , " rationals"
23
+ , " spec"
24
+ , " spec-discovery"
25
+ , " spec-quickcheck"
26
+ , " strings"
27
+ , " transformers"
28
+ ]
29
+ }
30
+ }
31
+
32
+ in upstream // additions
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ { name = " cw-purescript"
2
+ , dependencies =
3
+ [ " aff"
4
+ , " bigints"
5
+ , " console"
6
+ , " datetime"
7
+ , " debug"
8
+ , " effect"
9
+ , " either"
10
+ , " enums"
11
+ , " maybe"
12
+ , " ordered-collections"
13
+ , " prelude"
14
+ , " profunctor-lenses"
15
+ , " quickcheck"
16
+ , " rationals"
17
+ , " record"
18
+ , " spec"
19
+ , " spec-discovery"
20
+ , " spec-quickcheck"
21
+ , " spec-reporter-codewars"
22
+ , " tuples"
23
+ ]
24
+ , packages = ./ packages. dhall
25
+ , sources = [ " src/**/*.purs" , " test/**/*.purs" ]
26
+ }
Original file line number Diff line number Diff line change 1
1
module Test.Main where
2
2
3
3
import Prelude
4
+
4
5
import Data.Maybe (Maybe (..))
6
+ import Data.Time.Duration (Milliseconds (..))
5
7
import Effect (Effect )
6
-
8
+ import Effect.Aff ( launchAff_ )
7
9
import Test.Spec.Discovery (discover )
8
- import Test.Spec.Runner (defaultConfig , run' )
9
-
10
10
import Test.Spec.Reporter.Codewars (codewarsReporter )
11
+ import Test.Spec.Runner (defaultConfig , runSpec' )
11
12
12
13
main :: Effect Unit
13
- main = discover " .+Spec" >>= run ' config [codewarsReporter]
14
+ main = launchAff_ $ discover " .+Spec" >>= runSpec ' config [ codewarsReporter ]
14
15
where
15
- config = defaultConfig { timeout = Just 12000 }
16
+ config = defaultConfig { timeout = Just ( Milliseconds 12000.0 ) }
You can’t perform that action at this time.
0 commit comments