-
Notifications
You must be signed in to change notification settings - Fork 14
/
justfile
36 lines (27 loc) · 1.27 KB
/
justfile
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
api_index_path := "../generated/etc/api-index.v1.json"
mcpd := "target/debug/mcp"
# run *all* the tests
tests: mcp-tests cargo-tests
# run all tests for the 'master control program'
mcp-tests: mcpd
tests/mcp/journey-tests.sh {{mcpd}}
# run all tests driven by cargo
cargo-tests:
cargo test --tests --examples --all-features
# update everything that was generated in <this> repository
update-generated-fixtures: discovery-spec known-versions-fixture discovery-rs
# build the master control program in debug mode
mcpd:
cargo build
# fetch the spec used as fixture in our tests
discovery-spec:
curl https://www.googleapis.com/discovery/v1/apis/admin/directory_v1/rest -o discovery_parser/tests/spec.json
curl https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest -o google_rest_api_generator/tests/spec.json
# Update a fixture with all API versions encountered in the Google API index
known-versions-fixture:
# version 1.6 known to be working
jq -r '.items[].version' < {{api_index_path}} | sort | uniq > shared/tests/fixtures/known-versions
# A generated file with types supported the deserializtion of the Google API index
discovery-rs:
# version 15.0.199 known to be working
quicktype --lang rust --visibility=public {{api_index_path}} > discovery_parser/src/discovery.rs