mirror of
https://github.com/iv-org/inv_sig_helper.git
synced 2024-11-23 05:59:44 +00:00
GitHub workflow: Test the player script extractor every 2 hours
This commit is contained in:
parent
152b972b62
commit
f7cbcbddfa
7
.github/workflows/rust.yml
vendored
7
.github/workflows/rust.yml
vendored
@ -5,6 +5,9 @@ on:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
schedule:
|
||||
# every 2 hours
|
||||
- cron: "0 */2 * * *"
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
@ -18,5 +21,5 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
- name: Test server
|
||||
run: target/debug/inv_sig_helper_rust --test
|
||||
|
@ -65,6 +65,13 @@ async fn main() {
|
||||
}
|
||||
};
|
||||
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 {
|
||||
let unix_socket = match UnixListener::bind(socket_url) {
|
||||
Ok(x) => x,
|
||||
|
Loading…
Reference in New Issue
Block a user