From 52d2047ca65951dd292356faf4133d1c3dbb1b57 Mon Sep 17 00:00:00 2001 From: Elbert Ronnie <103196773+elbertronnie@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:56:54 +0530 Subject: [PATCH] Run Raw-rs tests only on CI (#1776) run raw-rs tests only on CI --- .github/workflows/ci.yml | 4 ++-- libraries/raw-rs/Cargo.toml | 3 +++ libraries/raw-rs/tests/tests.rs | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75b75bee..719fc750 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,7 +87,7 @@ jobs: - name: 🧪 Run Rust tests run: | - mold -run cargo nextest run + mold -run cargo nextest run --all-features # miri: # runs-on: self-hosted @@ -97,7 +97,7 @@ jobs: # - name: 🧪 Run Rust miri # run: | - # mold -run cargo +nightly miri nextest run -j32 + # mold -run cargo +nightly miri nextest run -j32 --all-features cargo-deny: runs-on: ubuntu-latest diff --git a/libraries/raw-rs/Cargo.toml b/libraries/raw-rs/Cargo.toml index 12b28de6..53f9da9b 100644 --- a/libraries/raw-rs/Cargo.toml +++ b/libraries/raw-rs/Cargo.toml @@ -12,6 +12,9 @@ homepage = "https://github.com/GraphiteEditor/Graphite/tree/master/libraries/raw repository = "https://github.com/GraphiteEditor/Graphite/tree/master/libraries/raw-rs" documentation = "https://docs.rs/raw-rs" +[features] +raw-rs-tests = [] + [dependencies] num_enum = "0.7.2" thiserror = { workspace = true } diff --git a/libraries/raw-rs/tests/tests.rs b/libraries/raw-rs/tests/tests.rs index 321025ff..bb1b05f0 100644 --- a/libraries/raw-rs/tests/tests.rs +++ b/libraries/raw-rs/tests/tests.rs @@ -13,8 +13,8 @@ const TEST_FILES: [&str; 1] = ["ILCE-7M3-ARW2.3.5-blossoms.arw"]; const BASE_URL: &str = "https://static.graphite.rs/test-data/libraries/raw-rs/"; const BASE_PATH: &str = "./tests/images"; -#[test] -fn test_images_matches_with_libraw() { +#[cfg_attr(feature = "raw-rs-tests", test)] +fn test_images_match_with_libraw() { download_images(); let mut failed_tests = 0;