Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Haskell Servant build to Shippable CI #2196

Merged
merged 5 commits into from
Feb 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
9 changes: 9 additions & 0 deletions CI/circle_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 16 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
46 changes: 46 additions & 0 deletions samples/server/petstore/haskell-servant/pom.xml
Original file line number Diff line number Diff line change
@@ -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>