Refactor the build scripts to all point at the same origin

This commit is contained in:
R Tyler Croy 2024-04-21 17:25:01 +00:00
parent f922e93d30
commit 13167d7b18
6 changed files with 15 additions and 12 deletions

View File

@ -12,16 +12,16 @@ check: ## Ensure that the crate meets the basic formatting and structure
(cd deployment && terraform fmt -check)
build: ## Build the crate with each set of features
cargo build
./ci/build.sh
build-release: check test ## Build the release versions of Lambdas
cargo lambda build --release --output-format zip
./ci/build-release.sh
deploy: check ## Deploy the examples
(cd deployment && terraform apply)
test: ## Run the crate's tests with each set of features
cargo test
./ci/test.sh
clean: ## Clean up resources from build
cargo clean

View File

@ -1,4 +1,3 @@
#!/bin/sh
cargo lambda build --release --output-format zip
exec cargo lambda build --release --output-format zip

View File

@ -1,3 +1,7 @@
#!/bin/sh
cargo lambda build
set -xe
cargo fmt --check
exec cargo build

View File

@ -1,3 +1,3 @@
#!/bin/sh
cargo test --verbose
exec cargo test --verbose

View File

@ -228,7 +228,7 @@ pub async fn actions_for(
let adds = add_actions_for(&new_files);
let removes = remove_actions_for(&mods.removes);
let metadata = match evolve_schema {
true => match metadata_actions_for(&new_files, &table).await {
true => match metadata_actions_for(&new_files, table).await {
Ok(axns) => axns,
Err(err) => {
error!("Attempted schema evolution but received an unhandled error!: {err:?}");
@ -424,7 +424,7 @@ fn coerce_field(
},
_ => {}
};
return field.clone();
field.clone()
}
#[cfg(test)]
@ -842,7 +842,7 @@ mod tests {
// Creating the table with one of the discovered files, so the remaining three should be
// added later
let table = create_table_with(&vec![files[0].clone()], store.clone())
let table = create_table_with(&[files[0].clone()], store.clone())
.await
.expect("Failed to create table");
@ -950,7 +950,7 @@ mod tests {
assert_eq!(files.len(), 4, "No files discovered");
// Creating the table with one of the discovered files, so the remaining three should be
// added later
let mut table = create_table_with(&vec![files[0].clone()], store.clone())
let mut table = create_table_with(&[files[0].clone()], store.clone())
.await
.expect("Failed to create table");
let initial_version = table.version();

View File

@ -78,7 +78,7 @@ mod tests {
let buf = r#"{
"body" : "{\"key\" : \"value\"}"
}"#;
let message: SqsMessage = serde_json::from_str(&buf).expect("Failed to deserialize");
let message: SqsMessage = serde_json::from_str(buf).expect("Failed to deserialize");
let messages = vec![
message.clone(),
message.clone(),