Skip to content

Commit

Permalink
GitHub workflow: Test the player script extractor every 2 hours
Browse files Browse the repository at this point in the history
  • Loading branch information
techmetx11 committed Aug 9, 2024
1 parent 152b972 commit f7cbcbd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
# every 2 hours
- cron: "0 */2 * * *"

env:
CARGO_TERM_COLOR: always
Expand All @@ -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
7 changes: 7 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f7cbcbd

Please sign in to comment.