fix: Make sure GitHub job pushes latest image on scheduled job

This commit is contained in:
Gerald Pinder 2024-08-24 15:04:27 -04:00
parent f13b67637b
commit 04972416cb
11 changed files with 231 additions and 179 deletions

View file

@ -21,23 +21,8 @@ pub(crate) static RT: Lazy<Runtime> = Lazy::new(|| {
#[cfg(test)]
pub(crate) mod test {
use std::sync::Mutex;
use blue_build_recipe::{Module, ModuleExt, Recipe};
use indexmap::IndexMap;
use once_cell::sync::Lazy;
pub const BB_UNIT_TEST_MOCK_GET_OS_VERSION: &str = "BB_UNIT_TEST_MOCK_GET_OS_VERSION";
/// This mutex is used for tests that require the reading of
/// environment variables. Env vars are an inheritly unsafe
/// as they can be changed and affect other threads functionality.
///
/// For tests that require setting env vars, they need to lock this
/// mutex before making changes to the env. Any changes made to the env
/// MUST be undone in the same test before dropping the lock. Failure to
/// do so will cause unpredictable behavior with other tests.
pub static ENV_LOCK: Lazy<Mutex<()>> = Lazy::new(|| Mutex::new(()));
pub fn create_test_recipe() -> Recipe<'static> {
Recipe::builder()