mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2025-04-17 03:13:16 -07:00
Using [`eserde`](https://github.com/mainmatter/eserde) at least for testing makes it much, much easier to find all the schema changes Riot makes every other Wednesday, and therefore makes this and https://github.com/MingweiSamuel/riotapi-schema easier to maintain. Example of error output: ```rust Failed to get match JP1_498473890: Riot API request failed after 0 retries with status code Some(200). Deserialization error: Something went wrong during deserialization: - info.participants[0].PlayerScore2: invalid type: floating point `732.5479125976562`, expected i32 at line 1 column 1795 - info.participants[0].PlayerScore3: invalid type: floating point `0.3532763719558716`, expected i32 at line 1 column 1829 - info.participants[0].PlayerScore4: invalid type: floating point `-0.8999999761581421`, expected i32 at line 1 column 1864 - info.participants[0].PlayerScore5: invalid type: floating point `1428.712158203125`, expected i32 at line 1 column 1897 - info.participants[0].PlayerScore6: invalid type: floating point `3546.9150390625`, expected i32 at line 1 column 1928 - info.participants[0].PlayerScore7: invalid type: floating point `848.3316650390625`, expected i32 at line 1 column 1961 - info.participants[0].PlayerScore8: invalid type: floating point `23.0013484954834`, expected i32 at line 1 column 1993 - info.participants[0].missions.playerScore2: invalid type: floating point `732.5479125976562`, expected i32 at line 1 column 6427 - info.participants[0].missions.playerScore3: invalid type: floating point `0.3532763719558716`, expected i32 at line 1 column 6461 - info.participants[0].missions.playerScore4: invalid type: floating point `-0.8999999761581421`, expected i32 at line 1 column 6496 - info.participants[0].missions.playerScore5: invalid type: floating point `1428.712158203125`, expected i32 at line 1 column 6529 - info.participants[0].missions.playerScore6: invalid type: floating point `3546.9150390625`, expected i32 at line 1 column 6560 - info.participants[0].missions.playerScore7: invalid type: floating point `848.3316650390625`, expected i32 at line 1 column 6593 - info.participants[0].missions.playerScore8: invalid type: floating point `23.0013484954834`, expected i32 at line 1 column 6625 ```
12 lines
251 B
Bash
12 lines
251 B
Bash
#!/bin/bash
|
|
set -euxo pipefail
|
|
|
|
export RGAPI_KEY="$(cat apikey.txt)"
|
|
|
|
cd riven
|
|
|
|
# Ensure builds with tracing, metrics.
|
|
wasm-pack build -- --features nightly,tracing,metrics
|
|
|
|
# Run tests.
|
|
wasm-pack test --node -- --features nightly,deny-unknown,eserde
|