From 1172f20137a61ca92ebe1e8fbb69403ae3645fe1 Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Sun, 14 Jun 2026 10:59:42 -0500 Subject: [PATCH] refactor(ci): move SODIUM_LIB_DIR to job-level env Moved SODIUM_LIB_DIR from per-step env blocks to job-level env for all three Rust test jobs (rust-fmt-check, rust-clippy, rust-tests). Benefits: - Applies to ALL cargo commands in the job, including generate-lockfile - More maintainable - single declaration per job - Consistent with best practices for job-wide environment variables Addresses automated review feedback. Co-Authored-By: Claude Sonnet 4.5 --- .gitea/workflows/test.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 9b911008..0fc3c7f8 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -12,6 +12,8 @@ jobs: runs-on: ubuntu-latest container: image: rustlang/rust:nightly + env: + SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu steps: - name: Checkout run: | @@ -63,16 +65,14 @@ jobs: - name: Update version from Git run: node scripts/update-version.mjs - run: cargo generate-lockfile --manifest-path src-tauri/Cargo.toml - env: - SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu - run: cargo fmt --manifest-path src-tauri/Cargo.toml --check - env: - SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu rust-clippy: runs-on: ubuntu-latest container: image: rustlang/rust:nightly + env: + SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu steps: - name: Checkout run: | @@ -106,13 +106,13 @@ jobs: - name: Install clippy run: rustup component add clippy - run: cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings - env: - SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu rust-tests: runs-on: ubuntu-latest container: image: rustlang/rust:nightly + env: + SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu steps: - name: Checkout run: | @@ -144,13 +144,9 @@ jobs: libsodium-dev \ pkg-config - run: cargo test --manifest-path src-tauri/Cargo.toml -- --test-threads=1 - env: - SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu - name: Run shell module tests run: 'cargo test --manifest-path src-tauri/Cargo.toml "shell::" -- --test-threads=1' - env: - SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu frontend-typecheck: runs-on: ubuntu-latest