Skip to content

Commit 86bb206

Browse files
committed
[**.md] Checkoff all implemented features ; [*] Conform to cdd-* standard syntax ; [.pre-commit-config.yaml] Introduce a RUN_SLOW_TESTS (disabled by default) ; [.github/workflows] Optimise with native docker services syntax ; [*] Conform to cdd-* standard syntax for CLI / SDK / subcommands
1 parent c094e57 commit 86bb206

22 files changed

Lines changed: 2693 additions & 2207 deletions

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ jobs:
2020
name: Build, Test & Checks
2121
runs-on: ubuntu-latest
2222

23+
services:
24+
petstore:
25+
image: swaggerapi/petstore
26+
ports:
27+
- 8080:8080
28+
2329
steps:
2430
- uses: actions/checkout@v7
2531

@@ -114,6 +120,12 @@ jobs:
114120
needs: build_and_test
115121
if: github.event_name == 'push'
116122
runs-on: ubuntu-latest
123+
124+
services:
125+
petstore:
126+
image: swaggerapi/petstore
127+
ports:
128+
- 8080:8080
117129
steps:
118130
- uses: actions/checkout@v7
119131
- name: Install Rust
@@ -142,6 +154,12 @@ jobs:
142154
needs: [build-native, build-wasm]
143155
if: startsWith(github.ref, 'refs/tags/v')
144156
runs-on: ubuntu-latest
157+
158+
services:
159+
petstore:
160+
image: swaggerapi/petstore
161+
ports:
162+
- 8080:8080
145163
steps:
146164
- uses: actions/checkout@v7
147165

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,49 +31,49 @@ repos:
3131

3232
- id: cargo-build
3333
name: cargo build
34-
entry: cargo build --workspace --all-targets
34+
entry: bash -c 'if [ "$RUN_SLOW_TESTS" = "1" ]; then cargo build --workspace --all-targets; else echo "Skipping cargo-build"; fi'
3535
language: system
3636
pass_filenames: false
3737
types: [rust]
3838

3939
- id: cargo-test
4040
name: cargo test
41-
entry: cargo test --workspace
41+
entry: bash -c 'if [ "$RUN_SLOW_TESTS" = "1" ]; then cargo test --workspace; else echo "Skipping cargo-test"; fi'
4242
language: system
4343
pass_filenames: false
4444
types: [rust]
4545

4646
- id: test-swagger-2
4747
name: Test Swagger 2.0 Petstore SDK
48-
entry: python3 scripts/test_sdk.py ../petstore.json ./target/petstore2
48+
entry: bash -c 'if [ "$RUN_SLOW_TESTS" = "1" ]; then python3 scripts/test_sdk.py ../petstore.json ./target/petstore2; else echo "Skipping test-swagger-2"; fi'
4949
language: system
5050
pass_filenames: false
5151
types: [rust]
5252

5353
- id: test-openapi-3
5454
name: Test OpenAPI 3.2.0 Petstore SDK
55-
entry: python3 scripts/test_sdk.py ../petstore_oas3.json ./target/petstore3
55+
entry: bash -c 'if [ "$RUN_SLOW_TESTS" = "1" ]; then python3 scripts/test_sdk.py ../petstore_oas3.json ./target/petstore3; else echo "Skipping test-openapi-3"; fi'
5656
language: system
5757
pass_filenames: false
5858
types: [rust]
5959

6060
- id: test-server-swagger-2
6161
name: Test Swagger 2.0 Petstore Server & Client
62-
entry: python3 scripts/test_server_and_client.py ../petstore.json ./target/server_petstore2 ./target/client_petstore2
62+
entry: bash -c 'if [ "$RUN_SLOW_TESTS" = "1" ]; then python3 scripts/test_server_and_client.py ../petstore.json ./target/server_petstore2 ./target/client_petstore2; else echo "Skipping test-server-swagger-2"; fi'
6363
language: system
6464
pass_filenames: false
6565
types: [rust]
6666

6767
- id: test-server-openapi-3
6868
name: Test OpenAPI 3.2.0 Petstore Server & Client
69-
entry: python3 scripts/test_server_and_client.py ../petstore_oas3.json ./target/server_petstore3 ./target/client_petstore3
69+
entry: bash -c 'if [ "$RUN_SLOW_TESTS" = "1" ]; then python3 scripts/test_server_and_client.py ../petstore_oas3.json ./target/server_petstore3 ./target/client_petstore3; else echo "Skipping test-server-openapi-3"; fi'
7070
language: system
7171
pass_filenames: false
7272
types: [rust]
7373

7474
- id: wasm-build
7575
name: WASM Build Test
76-
entry: python3 scripts/build_wasm.py
76+
entry: bash -c 'if [ "$RUN_SLOW_TESTS" = "1" ]; then python3 scripts/build_wasm.py; else echo "Skipping wasm-build"; fi'
7777
language: system
7878
pass_filenames: false
7979
types: [rust]

0 commit comments

Comments
 (0)