Skip to content

Commit

Permalink
Run tests in CI, except training
Browse files Browse the repository at this point in the history
Co-authored-by: Asuka Minato <[email protected]>
  • Loading branch information
dae and asukaminato0721 committed Aug 27, 2023
1 parent a955aeb commit c45aab4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ cargo fmt --check || (
)

cargo clippy -- -Dwarnings

install -d tests/data/
pushd tests/data/
wget https://github.com/open-spaced-repetition/fsrs-optimizer-burn/files/12394182/collection.anki21.zip
unzip *.zip
SKIP_TRAINING=1 cargo test
4 changes: 4 additions & 0 deletions src/training.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ mod tests {

#[test]
fn training() {
if std::env::var("SKIP_TRAINING").is_ok() {
println!("Skipping test in CI");
return;
}
use burn_ndarray::NdArrayBackend;
use burn_ndarray::NdArrayDevice;
type Backend = NdArrayBackend<f32>;
Expand Down

0 comments on commit c45aab4

Please sign in to comment.