Skip to content

Commit 16d13d6

Browse files
committed
Make mutation tests repeatable
1 parent ac9efca commit 16d13d6

File tree

4 files changed

+339
-187
lines changed

4 files changed

+339
-187
lines changed

.github/workflows/tests.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ jobs:
202202
- name: Additional Integration tests
203203
working-directory: ./examples/postgres
204204
run: |
205-
cargo test --test pg_query_tests entity_metadata_tests
205+
cargo test --test pg_query_tests
206+
cargo test --test entity_metadata_tests
206207
rm tests/pg_query_tests.rs tests/entity_metadata_tests.rs
207208
- name: Remove generated folder
208209
run: rm -rf ./examples/postgres/src
@@ -221,9 +222,9 @@ jobs:
221222
-u postgres://sea:[email protected]/sakila?currentSchema=public
222223
seaography-postgres-example -f axum
223224
- name: Depends on local seaography
224-
run: >-
225-
sed -i '/^\[dependencies.seaography\]$/a \path = "..\/..\/"'
226-
./examples/postgres/Cargo.toml
225+
run: |
226+
sed -i '/^\[dependencies.seaography\]$/a \path = "..\/..\/"' ./examples/postgres/Cargo.toml
227+
sed -i '/^\[dev.dependencies\]$/a \serde = { version = "1", features = ["derive"] }' ./examples/postgres/Cargo.toml
227228
- name: Build example
228229
working-directory: ./examples/postgres
229230
run: cargo build

examples/postgres/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ version = "~2.0.0-rc.2" # seaography version
1818
features = ["with-decimal", "with-chrono", "with-json", "with-postgres-array", "schema-meta"]
1919

2020
[dev-dependencies]
21+
serde = { version = "1", features = ["derive"] }
2122
serde_json = { version = "1.0.103" }
2223

2324
[workspace]

examples/postgres/tests/entity_metadata_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,10 @@ async fn test_entity_metadata() {
215215
"name": "mpaa_rating",
216216
"variants": [
217217
"G",
218-
"NC-17",
219218
"PG",
220219
"PG-13",
221-
"R"
220+
"R",
221+
"NC-17"
222222
]
223223
}
224224
}

0 commit comments

Comments
 (0)