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 <i@asukaminato.eu.org>
  • Loading branch information
dae and asukaminato0721 committed Aug 27, 2023
1 parent b40a4c2 commit f2f9647
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 @@ -170,6 +170,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 f2f9647

Please sign in to comment.