GitHub workflow: Test the player script extractor every 2 hours
This commit is contained in:
parent
152b972b62
commit
f7cbcbddfa
2 changed files with 12 additions and 2 deletions
7
.github/workflows/rust.yml
vendored
7
.github/workflows/rust.yml
vendored
|
@ -5,6 +5,9 @@ on:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
|
schedule:
|
||||||
|
# every 2 hours
|
||||||
|
- cron: "0 */2 * * *"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
@ -18,5 +21,5 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
- name: Run tests
|
- name: Test server
|
||||||
run: cargo test --verbose
|
run: target/debug/inv_sig_helper_rust --test
|
||||||
|
|
|
@ -65,6 +65,13 @@ async fn main() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
loop_main!(tcp_socket, state);
|
loop_main!(tcp_socket, state);
|
||||||
|
} else if socket_url == "--test" {
|
||||||
|
// TODO: test the API aswell, this only tests the player script extractor
|
||||||
|
println!("Fetching player");
|
||||||
|
match fetch_update(state.clone()).await {
|
||||||
|
Ok(()) => std::process::exit(0),
|
||||||
|
Err(_x) => std::process::exit(-1),
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
let unix_socket = match UnixListener::bind(socket_url) {
|
let unix_socket = match UnixListener::bind(socket_url) {
|
||||||
Ok(x) => x,
|
Ok(x) => x,
|
||||||
|
|
Loading…
Reference in a new issue