From 7f25aaf35c866df7fbe71e063259a7291ea63af5 Mon Sep 17 00:00:00 2001 From: dodokek Date: Tue, 4 Feb 2025 12:38:51 +0300 Subject: [PATCH 1/4] feat: add ability to store different versions of plugin Closes #51, #34 --- README.md | 1 + src/commands/lib.rs | 5 +- src/commands/plugin/build.rs | 6 ++- src/commands/plugin/pack.rs | 8 +-- src/commands/run.rs | 4 +- src/helpers/build/mod.rs | 97 ++++++++++++++++++------------------ src/main.rs | 10 +++- 7 files changed, 72 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 36b7b0d..8a92801 100644 --- a/README.md +++ b/README.md @@ -248,6 +248,7 @@ cargo pike plugin build #### Доступные опции - `--release` - Сборка release-версии плагина +- `--target-dir ` - Директория собранных бинарных файлов. Значение по умолчанию: `target` ### `config apply` diff --git a/src/commands/lib.rs b/src/commands/lib.rs index 1fbcaf6..bb8c3be 100644 --- a/src/commands/lib.rs +++ b/src/commands/lib.rs @@ -1,5 +1,6 @@ use anyhow::{bail, Context, Result}; use std::io::{BufRead, BufReader, Read}; +use std::path::PathBuf; use std::process::{Command, Stdio}; pub enum BuildType { @@ -8,7 +9,7 @@ pub enum BuildType { } #[allow(clippy::needless_pass_by_value)] -pub fn cargo_build(build_type: BuildType) -> Result<()> { +pub fn cargo_build(build_type: BuildType, target_dir: &PathBuf) -> Result<()> { let mut args = vec!["build"]; if let BuildType::Release = build_type { args.push("--release"); @@ -16,6 +17,8 @@ pub fn cargo_build(build_type: BuildType) -> Result<()> { let mut child = Command::new("cargo") .args(args) + .arg("--target-dir") + .args(target_dir) .stdout(Stdio::piped()) .spawn() .context("running cargo build")?; diff --git a/src/commands/plugin/build.rs b/src/commands/plugin/build.rs index 51a83e4..a06e1a1 100644 --- a/src/commands/plugin/build.rs +++ b/src/commands/plugin/build.rs @@ -1,13 +1,15 @@ +use std::path::PathBuf; + use anyhow::{Context, Result}; use lib::{cargo_build, BuildType}; use crate::commands::lib; -pub fn cmd(release: bool) -> Result<()> { +pub fn cmd(release: bool, target_dir: &PathBuf) -> Result<()> { let build_type = if release { BuildType::Release } else { BuildType::Debug }; - cargo_build(build_type).context("building of plugin") + cargo_build(build_type, target_dir).context("building of plugin") } diff --git a/src/commands/plugin/pack.rs b/src/commands/plugin/pack.rs index ccf66ac..ff3da0c 100644 --- a/src/commands/plugin/pack.rs +++ b/src/commands/plugin/pack.rs @@ -5,7 +5,7 @@ use lib::{cargo_build, BuildType}; use serde::Deserialize; use std::fs::File; use std::io::{BufRead, BufReader}; -use std::path::Path; +use std::path::{Path, PathBuf}; use std::{env, fs}; use tar::Builder; @@ -28,7 +28,7 @@ const LIB_EXT: &str = "so"; #[cfg(target_os = "macos")] const LIB_EXT: &str = "dylib"; -pub fn cmd(pack_debug: bool, target_dir: &Path) -> Result<()> { +pub fn cmd(pack_debug: bool, target_dir: &PathBuf) -> Result<()> { let root_dir = env::current_dir()?; let plugin_name = &root_dir .file_name() @@ -37,10 +37,10 @@ pub fn cmd(pack_debug: bool, target_dir: &Path) -> Result<()> { .context("parsing filename to string")?; let build_dir = if pack_debug { - cargo_build(BuildType::Debug).context("building release version of plugin")?; + cargo_build(BuildType::Debug, target_dir).context("building release version of plugin")?; Path::new(&root_dir).join(target_dir).join("debug") } else { - cargo_build(BuildType::Release).context("building debug version of plugin")?; + cargo_build(BuildType::Release, target_dir).context("building debug version of plugin")?; Path::new(&root_dir).join(target_dir).join("release") }; diff --git a/src/commands/run.rs b/src/commands/run.rs index 125202d..9c572c1 100644 --- a/src/commands/run.rs +++ b/src/commands/run.rs @@ -395,10 +395,10 @@ pub fn cluster(params: &Params) -> Result> { ))?; let plugins_dir = if params.use_release { - cargo_build(lib::BuildType::Release)?; + cargo_build(lib::BuildType::Release, ¶ms.target_dir)?; params.target_dir.join("release") } else { - cargo_build(lib::BuildType::Debug)?; + cargo_build(lib::BuildType::Debug, ¶ms.target_dir)?; params.target_dir.join("debug") }; diff --git a/src/helpers/build/mod.rs b/src/helpers/build/mod.rs index 05e7233..555364d 100644 --- a/src/helpers/build/mod.rs +++ b/src/helpers/build/mod.rs @@ -3,8 +3,6 @@ use fs_extra::dir; use fs_extra::dir::CopyOptions; use std::env; use std::fs; -use std::fs::File; -use std::io::{BufRead, BufReader}; use std::path::{Path, PathBuf}; const MANIFEST_TEMPLATE_NAME: &str = "manifest.yaml.template"; @@ -15,38 +13,54 @@ const LIB_EXT: &str = "so"; #[cfg(target_os = "macos")] const LIB_EXT: &str = "dylib"; +// Get output path from env variable to get path up until debug/ or release/ folder fn get_output_path() -> PathBuf { - let manifest_dir_string = env::var("CARGO_MANIFEST_DIR").unwrap(); - let build_type = env::var("PROFILE").unwrap(); - - // Workaround for case, when plugins is a subcrate of workspace - if !Path::new("../Cargo.toml").exists() { - return Path::new(&manifest_dir_string) - .join("target") - .join(build_type); - } - - let cargo_toml_file: File = File::open("../Cargo.toml").unwrap(); - let toml_reader = BufReader::new(cargo_toml_file); - for line in toml_reader.lines() { - let line = line.unwrap(); - if line.contains("workspace") { - return Path::new(&manifest_dir_string) - .join("..") - .join("target") - .join(build_type); - } - } - - Path::new(&manifest_dir_string) - .join("target") - .join(build_type) + Path::new(&env::var("OUT_DIR").unwrap()) + .ancestors() + .take(4) + .collect() } #[derive(Debug, Builder)] pub struct Params {} pub fn main(_params: &Params) { + let out_dir = get_output_path(); + let out_manifest_path = Path::new(&out_dir).join("manifest.yaml"); + let pkg_version = env::var("CARGO_PKG_VERSION").unwrap(); + let pkg_name = env::var("CARGO_PKG_NAME").unwrap(); + let plugin_path = out_dir.join(&pkg_name).join(&pkg_version); + let lib_name = format!("lib{}.{LIB_EXT}", pkg_name.replace('-', "_")); + + dir::remove(&plugin_path).unwrap(); + fs::create_dir_all(&plugin_path).unwrap(); + + // Iterate through plugins version to find the latest + // then replace symlinks with actual files + for plugin_version_entry in fs::read_dir(out_dir.join(&pkg_name)).unwrap() { + let plugin_version_path = plugin_version_entry.unwrap().path(); + if !plugin_version_path.is_dir() { + continue; + } + + for plugin_artefact in fs::read_dir(&plugin_version_path).unwrap() { + let entry = plugin_artefact.unwrap(); + if !entry.file_type().unwrap().is_symlink() + || (entry.file_name().to_str().unwrap() != lib_name) + { + continue; + } + + // Need to remove symlink before copying in order to properly replace symlink with file + let plugin_lib_path = plugin_version_path.join(&lib_name); + let _ = fs::remove_file(&plugin_lib_path); + fs::copy(out_dir.join(&lib_name), &plugin_lib_path).unwrap(); + + break; + } + } + + // Generate new manifest.yaml and migrations from template let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); let crate_dir = Path::new(&crate_dir); @@ -74,40 +88,27 @@ pub fn main(_params: &Params) { Err(_) => Vec::new(), }; - let pkg_version = env::var("CARGO_PKG_VERSION").unwrap(); - let template_ctx = liquid::object!({ "version": pkg_version, "migrations": migrations, }); - let out_dir = get_output_path(); - let out_manifest_path = Path::new(&out_dir).join("manifest.yaml"); fs::write(&out_manifest_path, template.render(&template_ctx).unwrap()).unwrap(); + // Copy migrations directory and manifest into newest plugin version if !migrations.is_empty() { let mut cp_opts = CopyOptions::new(); cp_opts.overwrite = true; - dir::copy(migrations_dir, &out_dir, &cp_opts).unwrap(); + dir::copy(&migrations_dir, &out_dir, &cp_opts).unwrap(); + dir::copy(out_dir.join("migrations"), &plugin_path, &cp_opts).unwrap(); } + fs::copy(out_manifest_path, plugin_path.join("manifest.yaml")).unwrap(); - // create symbolic link - let pkg_name = env::var("CARGO_PKG_NAME").unwrap(); - let plugin_path = out_dir.join(&pkg_name).join(pkg_version); - dir::remove(&plugin_path).unwrap(); - fs::create_dir_all(&plugin_path).unwrap(); - std::os::unix::fs::symlink(out_manifest_path, plugin_path.join("manifest.yaml")).unwrap(); - let lib_name = format!("lib{pkg_name}.{LIB_EXT}"); + // Create symlinks for newest plugin version, which would be created after build.rs script std::os::unix::fs::symlink(out_dir.join(&lib_name), plugin_path.join(lib_name)).unwrap(); - if !migrations.is_empty() { - std::os::unix::fs::symlink(out_dir.join("migrations"), plugin_path.join("migrations")) - .unwrap(); - - for m in &migrations { - println!("cargo::rerun-if-changed={m}"); - } - } - + // Trigger on Cargo.toml change in order not to run cargo update each time + // version is changed + println!("cargo::rerun-if-changed=Cargo.toml"); println!("cargo::rerun-if-changed={MANIFEST_TEMPLATE_NAME}"); } diff --git a/src/main.rs b/src/main.rs index 1a265ab..7076fb3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -88,6 +88,9 @@ enum Plugin { }, /// Alias for cargo build command Build { + #[arg(long, value_name = "TARGET_DIR", default_value = "target")] + target_dir: PathBuf, + #[arg(long, short)] release: bool, }, @@ -218,8 +221,11 @@ fn main() -> Result<()> { commands::plugin::pack::cmd(debug, &target_dir) .context("failed to execute \"pack\" command")?; } - Plugin::Build { release } => { - commands::plugin::build::cmd(release) + Plugin::Build { + release, + target_dir, + } => { + commands::plugin::build::cmd(release, &target_dir) .context("failed to execute \"build\" command")?; } Plugin::New { From 854fffa4be59fa729a7822596613e9970f1b5917 Mon Sep 17 00:00:00 2001 From: dodokek Date: Wed, 5 Feb 2025 08:05:30 +0300 Subject: [PATCH 2/4] test: add integrational tests for build.rs --- Cargo.lock | 47 +++++++++++++------------ Cargo.toml | 3 +- tests/helpers/mod.rs | 83 ++++++++++++++++++++++++++++++++++++++++++-- tests/run.rs | 61 ++++++++++++++++++++++++++++++-- 4 files changed, 166 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 976b156..1b242f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -114,9 +114,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.5.27" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" +checksum = "3e77c3243bd94243c03672cb5154667347c457ca271254724f9f393aee1c05ff" dependencies = [ "clap_builder", "clap_derive", @@ -136,9 +136,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.24" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" +checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" dependencies = [ "heck", "proc-macro2", @@ -190,9 +190,9 @@ dependencies = [ [[package]] name = "constcat" -version = "0.6.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffb5df6dd5dadb422897e8132f415d7a054e3cd757e5070b663f75bea1840fb" +checksum = "4938185353434999ef52c81753c8cca8955ed38042fc29913db3751916f3b7ab" [[package]] name = "cpufeatures" @@ -533,9 +533,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "liquid" -version = "0.26.10" +version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d394f129df4bc476c828219f621c1a9e42c9d40c31e2849242087cb5ee279448" +checksum = "2a494c3f9dad3cb7ed16f1c51812cbe4b29493d6c2e5cd1e2b87477263d9534d" dependencies = [ "liquid-core", "liquid-derive", @@ -545,9 +545,9 @@ dependencies = [ [[package]] name = "liquid-core" -version = "0.26.10" +version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7b563798f47f5158238ece76514553c2ce8ca58a20dd59abb21dfdbc3724980" +checksum = "fc623edee8a618b4543e8e8505584f4847a4e51b805db1af6d9af0a3395d0d57" dependencies = [ "anymap2", "itertools", @@ -562,9 +562,9 @@ dependencies = [ [[package]] name = "liquid-derive" -version = "0.26.9" +version = "0.26.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddde51013c8d2694f8c162c2ceb7abaed91f5175ec1e75a6392e35913e907c5d" +checksum = "de66c928222984aea59fcaed8ba627f388aaac3c1f57dcb05cc25495ef8faefe" dependencies = [ "proc-macro2", "quote", @@ -573,9 +573,9 @@ dependencies = [ [[package]] name = "liquid-lib" -version = "0.26.10" +version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2bf4efd9b4a38bf76fac10d8f010ac568251761290a3dbffd4719d41c9f044" +checksum = "9befeedd61f5995bc128c571db65300aeb50d62e4f0542c88282dbcb5f72372a" dependencies = [ "itertools", "liquid-core", @@ -705,6 +705,7 @@ dependencies = [ "serde_yaml", "tar", "toml", + "toml_edit", ] [[package]] @@ -748,7 +749,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ "rand_chacha", "rand_core", - "zerocopy 0.8.14", + "zerocopy 0.8.16", ] [[package]] @@ -768,7 +769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" dependencies = [ "getrandom", - "zerocopy 0.8.14", + "zerocopy 0.8.16", ] [[package]] @@ -1138,9 +1139,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e49d2d35d3fad69b39b94139037ecfb4f359f08958b9c11e7315ce770462419" +checksum = "86e376c75f4f43f44db463cf729e0d3acbf954d13e22c51e26e4c264b4ab545f" dependencies = [ "memchr", ] @@ -1177,11 +1178,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.14" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468" +checksum = "7b8c07a70861ce02bad1607b5753ecb2501f67847b9f9ada7c160fff0ec6300c" dependencies = [ - "zerocopy-derive 0.8.14", + "zerocopy-derive 0.8.16", ] [[package]] @@ -1197,9 +1198,9 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.8.14" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1" +checksum = "5226bc9a9a9836e7428936cde76bb6b22feea1a8bfdbc0d241136e4d13417e25" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index b5e0c8d..3b1bf77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,4 +46,5 @@ name = "cargo-pike" path = "src/main.rs" [dev-dependencies] -constcat = "0.6.0" +toml_edit = "0.22.23" +constcat = "0.5.1" diff --git a/tests/helpers/mod.rs b/tests/helpers/mod.rs index 729632d..4d80da7 100644 --- a/tests/helpers/mod.rs +++ b/tests/helpers/mod.rs @@ -2,6 +2,7 @@ use constcat::concat; use log::info; use std::ffi::OsStr; use std::io::{BufRead, BufReader, Write}; +use std::path::PathBuf; use std::thread; use std::{ fs::{self}, @@ -10,9 +11,15 @@ use std::{ process::{Child, Command, Stdio}, time::{Duration, Instant}, }; +use toml_edit::{DocumentMut, Item}; pub const TESTS_DIR: &str = "./tests/tmp/"; -pub const PLUGIN_DIR: &str = concat!(TESTS_DIR, "test_plugin/"); +pub const PLUGIN_DIR: &str = concat!(TESTS_DIR, "test-plugin/"); + +pub enum BuildType { + Release, + Debug, +} pub struct Cluster { run_handler: Option, @@ -56,13 +63,85 @@ impl Cluster { } } +pub fn check_plugin_version_artefacts(plugin_path: &Path, check_symlinks: bool) -> bool { + let symlink_path = plugin_path.join("libtest_plugin.so"); + + if check_symlinks && !validate_symlink(&symlink_path) { + return false; + } + + check_existance(&plugin_path.join("manifest.yaml"), false) + && check_existance(&plugin_path.join("libtest_plugin.so"), check_symlinks) + && check_existance(&plugin_path.join("migrations"), false) +} + +fn validate_symlink(symlink_path: &PathBuf) -> bool { + if let Ok(metadata) = fs::symlink_metadata(symlink_path) { + if metadata.file_type().is_symlink() { + if let Ok(resolved_path) = fs::read_link(symlink_path) { + return fs::metadata(resolved_path).is_ok(); + } + } + } + + false +} + +fn check_existance(path: &Path, check_symlinks: bool) -> bool { + if !path.exists() { + return false; + }; + + let is_symlink = path + .symlink_metadata() + .map(|m| m.file_type().is_symlink()) + .unwrap_or(false); + if check_symlinks { + is_symlink + } else { + !is_symlink + } +} + +pub fn build_plugin(build_type: &BuildType, new_version: &str) { + // Change plugin version + let cargo_toml_path = Path::new(PLUGIN_DIR).join("Cargo.toml"); + let toml_content = fs::read_to_string(&cargo_toml_path).unwrap(); + + let mut doc = toml_content + .parse::() + .expect("Failed to parse Cargo.toml"); + + if let Some(Item::Table(package)) = doc.get_mut("package") { + if let Some(version) = package.get_mut("version") { + *version = toml_edit::value(new_version); + } + } + fs::write(cargo_toml_path, doc.to_string()).unwrap(); + + // Build according version + match build_type { + BuildType::Debug => Command::new("cargo") + .args(vec!["build"]) + .current_dir(PLUGIN_DIR) + .output() + .unwrap(), + BuildType::Release => Command::new("cargo") + .args(vec!["build"]) + .arg("--release") + .current_dir(PLUGIN_DIR) + .output() + .unwrap(), + }; +} + pub fn run_cluster(timeout: Duration, total_instances: i32) -> Result { // Set up cleanup function let mut cluster_handle = Cluster::new(); // Create plugin from template let mut plugin_creation_proc = - run_pike(vec!["plugin", "new", "test_plugin"], TESTS_DIR).unwrap(); + run_pike(vec!["plugin", "new", "test-plugin"], TESTS_DIR).unwrap(); wait_for_proc(&mut plugin_creation_proc, Duration::from_secs(10)); diff --git a/tests/run.rs b/tests/run.rs index 5145a43..6235786 100644 --- a/tests/run.rs +++ b/tests/run.rs @@ -1,10 +1,67 @@ mod helpers; -use helpers::run_cluster; -use std::time::Duration; +use helpers::{ + build_plugin, check_plugin_version_artefacts, run_cluster, run_pike, wait_for_proc, PLUGIN_DIR, + TESTS_DIR, +}; +use std::{fs, path::Path, time::Duration}; const TOTAL_INSTANCES: i32 = 4; #[test] fn test_cluster_setup_debug() { let _cluster_handle = run_cluster(Duration::from_secs(120), TOTAL_INSTANCES).unwrap(); } + +#[test] +fn test_cargo_build() { + // Cleaning up metadata from past run + if Path::new(PLUGIN_DIR).exists() { + fs::remove_dir_all(PLUGIN_DIR).unwrap(); + } + + let mut plugin_creation_proc = + run_pike(vec!["plugin", "new", "test-plugin"], TESTS_DIR).unwrap(); + + wait_for_proc(&mut plugin_creation_proc, Duration::from_secs(10)); + + build_plugin(&helpers::BuildType::Debug, "0.1.0"); + build_plugin(&helpers::BuildType::Debug, "0.1.1"); + build_plugin(&helpers::BuildType::Release, "0.1.0"); + build_plugin(&helpers::BuildType::Release, "0.1.1"); + + assert!(check_plugin_version_artefacts( + &Path::new(PLUGIN_DIR) + .join("target") + .join("debug") + .join("test-plugin") + .join("0.1.0"), + false + )); + + assert!(check_plugin_version_artefacts( + &Path::new(PLUGIN_DIR) + .join("target") + .join("debug") + .join("test-plugin") + .join("0.1.1"), + true + )); + + assert!(check_plugin_version_artefacts( + &Path::new(PLUGIN_DIR) + .join("target") + .join("release") + .join("test-plugin") + .join("0.1.0"), + false + )); + + assert!(check_plugin_version_artefacts( + &Path::new(PLUGIN_DIR) + .join("target") + .join("release") + .join("test-plugin") + .join("0.1.1"), + true + )); +} From adc7ca1741ad068897b2d0cd2a3f28d4966faad7 Mon Sep 17 00:00:00 2001 From: Aleksander Morozov Date: Wed, 5 Feb 2025 13:32:02 +0300 Subject: [PATCH 3/4] ci: change branch for pike in plugin template --- plugin_template/_Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin_template/_Cargo.toml b/plugin_template/_Cargo.toml index 74a4488..ba48f41 100644 --- a/plugin_template/_Cargo.toml +++ b/plugin_template/_Cargo.toml @@ -10,11 +10,11 @@ serde = { version = "1", features = ["derive"] } log = "0.4" [dev-dependencies] -picodata-pike = { git = "https://github.com/picodata/pike.git", branch = "daemon_v2" } # TODO: change after publish on crates.io +picodata-pike = { git = "https://github.com/picodata/pike.git", branch = "more_versions" } # TODO: change after publish on crates.io reqwest = { version = "0.12", features = ["blocking"] } [build-dependencies] -picodata-pike = { git = "https://github.com/picodata/pike.git", branch = "daemon_v2" } # TODO: change after publish on crates.io +picodata-pike = { git = "https://github.com/picodata/pike.git", branch = "more_versions" } # TODO: change after publish on crates.io liquid = "0.26" fs_extra = "1" From 97db00ca5ef8a0133ad3bbf816b6dcee0bb4a48e Mon Sep 17 00:00:00 2001 From: Aleksander Morozov Date: Wed, 5 Feb 2025 13:38:24 +0300 Subject: [PATCH 4/4] ci: change CI trigger for push --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bcf84db..467a82d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,8 @@ name: Tests on: push: - branches: - - master pull_request: + types: [opened, reopened] jobs: pre_job: