-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
86 lines (75 loc) · 3.08 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
86 lines (75 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: mixed-line-ending
args: ['--fix=lf']
exclude: \.(bat|cmd|ps1)$
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --
language: system
types: [rust]
pass_filenames: true
- id: cargo-check
name: cargo check
entry: cargo check --workspace --all-targets
language: system
pass_filenames: false
types: [rust]
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --workspace --all-targets --all-features -- -D warnings
language: system
pass_filenames: false
types: [rust]
- id: cargo-build
name: cargo build
entry: bash -c 'if [ "$RUN_SLOW_TESTS" = "1" ]; then cargo build --workspace --all-targets; else echo "Skipping cargo-build"; fi'
language: system
pass_filenames: false
types: [rust]
- id: cargo-test
name: cargo test
entry: bash -c 'if [ "$RUN_SLOW_TESTS" = "1" ]; then cargo test --workspace; else echo "Skipping cargo-test"; fi'
language: system
pass_filenames: false
types: [rust]
- id: test-swagger-2
name: Test Swagger 2.0 Petstore SDK
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'
language: system
pass_filenames: false
types: [rust]
- id: test-openapi-3
name: Test OpenAPI 3.2.0 Petstore SDK
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'
language: system
pass_filenames: false
types: [rust]
- id: test-server-swagger-2
name: Test Swagger 2.0 Petstore Server & Client
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'
language: system
pass_filenames: false
types: [rust]
- id: test-server-openapi-3
name: Test OpenAPI 3.2.0 Petstore Server & Client
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'
language: system
pass_filenames: false
types: [rust]
- id: wasm-build
name: WASM Build Test
entry: bash -c 'if [ "$RUN_SLOW_TESTS" = "1" ]; then python3 scripts/build_wasm.py; else echo "Skipping wasm-build"; fi'
language: system
pass_filenames: false
types: [rust]
- id: update-coverage
name: Update Coverage Badges
entry: python3 scripts/update_coverage.py
language: system
pass_filenames: false
always_run: true