Skip to content

Commit

Permalink
[rust-server] Add rust-server to travis CI (#308)
Browse files Browse the repository at this point in the history
* Add rust-server to travis CI

* Install rust correctly (and only once)
  • Loading branch information
bjgill authored and wing328 committed Jun 13, 2018
1 parent f964873 commit 91d6d77
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ cache:
- $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings
- $HOME/samples/client/petstore/typescript-angular/node_modules
- $HOME/samples/client/petstore/typescript-angular/typings
- $HOME/samples/server/petstore/rust-server/target
- $HOME/perl5
- $HOME/.cargo

services:
- docker
Expand All @@ -41,7 +43,7 @@ before_install:
- stack upgrade
- stack --version
# install rust
- curl -sSf https://static.rust-lang.org/rustup.sh | sh
- curl https://sh.rustup.rs -sSf | sh -s -- -y -v
# required when sudo: required for the Ruby petstore tests
- gem install bundler
- npm install -g typescript
Expand Down Expand Up @@ -83,7 +85,7 @@ install:
# Add Godeps dependencies to GOPATH and PATH
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)"
- export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace"
- export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH"
- export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$HOME/.cargo/bin:$PATH"
- go version

script:
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@
<module>samples/client/petstore/typescript-angular-v4.3/npm</module>
<!--<module>samples/client/petstore/bash</module>-->
<module>samples/client/petstore/ruby</module>
<module>samples/server/petstore/rust-server</module>
</modules>
</profile>
</profiles>
Expand Down
46 changes: 46 additions & 0 deletions samples/server/petstore/rust-server/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>RustServerTests</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>Rust Petstore Sample</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.2.1</version>
<executions>
<execution>
<id>bundle-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>cargo</executable>
<arguments>
<argument>test</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 91d6d77

Please sign in to comment.