forked from loafle/openapi-generator-original
Add tests for rust reqwest middleware client (#13990)
* add tests for rust reqwest middleware client * add github workflow * trigger build * fix rust * trigger build failure * Revert "trigger build failure" This reverts commit 42d8ff42ee04d207d8c2dad4a9714a9c7ad3b1c5. * Update pom.xml Co-authored-by: Nathan Shaaban <86252985+nshaaban-cPacket@users.noreply.github.com> * simplify folder Co-authored-by: Nathan Shaaban <86252985+nshaaban-cPacket@users.noreply.github.com>
This commit is contained in:
parent
188c39dccd
commit
4a5c9ff2d2
31
.github/workflows/samples-rust.yaml
vendored
Normal file
31
.github/workflows/samples-rust.yaml
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name: Samples Rust
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'samples/client/petstore/rust/**'
|
||||||
|
- 'samples/server/petstore/rust-server/**'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'samples/client/petstore/rust/**'
|
||||||
|
- 'samples/server/petstore/rust-server/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Rust
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
sample:
|
||||||
|
# these folders contain sub-projects of rust clients, servers
|
||||||
|
- samples/client/petstore/rust/
|
||||||
|
- samples/server/petstore/rust-server/
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
- name: Build
|
||||||
|
working-directory: ${{ matrix.sample }}
|
||||||
|
run: cargo build
|
2
pom.xml
2
pom.xml
@ -1170,8 +1170,10 @@
|
|||||||
<module>samples/client/petstore/c</module>
|
<module>samples/client/petstore/c</module>
|
||||||
-->
|
-->
|
||||||
<module>samples/client/petstore/rust</module>
|
<module>samples/client/petstore/rust</module>
|
||||||
|
<module>samples/client/petstore/rust/hyper/petstore</module>
|
||||||
<module>samples/client/petstore/rust/reqwest/petstore</module>
|
<module>samples/client/petstore/rust/reqwest/petstore</module>
|
||||||
<module>samples/client/petstore/rust/reqwest/petstore-async</module>
|
<module>samples/client/petstore/rust/reqwest/petstore-async</module>
|
||||||
|
<module>samples/client/petstore/rust/reqwest/petstore-async-middleware</module>
|
||||||
<!--<module>samples/client/petstore/javascript-apollo</module>-->
|
<!--<module>samples/client/petstore/javascript-apollo</module>-->
|
||||||
<module>samples/client/petstore/python-legacy</module>
|
<module>samples/client/petstore/python-legacy</module>
|
||||||
<module>samples/client/petstore/python-asyncio</module>
|
<module>samples/client/petstore/python-asyncio</module>
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.openapitools</groupId>
|
||||||
|
<artifactId>RustReqwestAsyncMiddlewareClientTests</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>Rust Reqwest Async Middleware Petstore Client</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>build</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user