Skip to content
Permalink
Browse files

Add Haskell Servant build to Travis CI (#2196)

Add Haskell Servant build to Shippable CI
  • Loading branch information...
wing328 committed Feb 24, 2019
1 parent e665827 commit a36319185bb6cababae2718f301594545d56b7b6
Showing with 72 additions and 6 deletions.
  1. +0 −5 .travis.yml
  2. +9 −0 CI/circle_parallel.sh
  3. +1 −0 circle.yml
  4. +16 −1 pom.xml
  5. +46 −0 samples/server/petstore/haskell-servant/pom.xml
@@ -28,7 +28,6 @@ cache:
- $HOME/samples/server/petstore/rust-server/target
- $HOME/perl5
- $HOME/.cargo
- $HOME/.stack
- $HOME/.pub-cache
- $HOME/samples/server/petstore/cpp-pistache/pistache
- $HOME/.npm
@@ -50,10 +49,6 @@ addons:
- petstore.swagger.io

before_install:
# install haskell
- curl -sSL https://get.haskellstack.org/ | sh
- stack upgrade
- stack --version
# install rust
- curl https://sh.rustup.rs -sSf | sh -s -- -y -v
# required when sudo: required for the Ruby petstore tests
@@ -5,6 +5,8 @@

NODE_INDEX=${CIRCLE_NODE_INDEX:-0}

set -e

if [ "$NODE_INDEX" = "1" ]; then
echo "Running node $NODE_INDEX to test 'samples.circleci' defined in pom.xml ..."
#cp CI/pom.xml.circleci pom.xml
@@ -16,6 +18,13 @@ elif [ "$NODE_INDEX" = "2" ]; then
#export GO_POST_PROCESS_FILE="/usr/local/bin/gofmt -w"
# not formatting the code as different go versions may format the code a bit different
./bin/utils/ensure-up-to-date
elif [ "$NODE_INDEX" = "3" ]; then
echo "Running node $NODE_INDEX to test haskell"
# install haskell
url -sSL https://get.haskellstack.org/ | sh
stack upgrade
stack --version:w
mvn --quiet verify -Psamples.misc
else
echo "Running node $NODE_INDEX to test 'samples.circleci.jdk7' defined in pom.xml ..."
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
@@ -83,6 +83,7 @@ jobs:
- ~/.gradle
- ~/.cache/bower
- ".git"
- ~/.stack
# Teardown
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# Save test results
17 pom.xml
@@ -1023,7 +1023,6 @@
<!--<module>samples/client/petstore/dart-jaguar/openapi</module>
<module>samples/client/petstore/dart-jaguar/flutter_petstore/openapi</module>-->
<!--<module>samples/client/petstore/dart2/petstore</module>-->
<module>samples/client/petstore/haskell-http-client</module>
<module>samples/client/petstore/elm-0.18</module>
<module>samples/client/petstore/groovy</module>
<module>samples/client/petstore/rust</module>
@@ -1239,6 +1238,22 @@
<module>samples/server/petstore/spring-mvc-j8-localdatetime</module>
</modules>
</profile>
<!-- test with Haskell -->
<profile>
<id>samples.misc</id>
<activation>
<property>
<name>env</name>
<value>samples.misc</value>
</property>
</activation>
<modules>
<!-- clients -->
<module>samples/client/petstore/haskell-http-client</module>
<!-- servers -->
<module>samples/server/petstore/haskell-servant</module>
</modules>
</profile>
<profile>
<id>samples.ios</id>
<activation>
@@ -0,0 +1,46 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>HaskellServantServerTests</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>Haskell Servant Petstore Server</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>compile-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>stack</executable>
<arguments>
<argument>test</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit a363191

Please sign in to comment.
You can’t perform that action at this time.