Skip to content

Commit

Permalink
Merge pull request #3 from exoego/ci
Browse files Browse the repository at this point in the history
setup CI
  • Loading branch information
exoego committed Mar 28, 2024
2 parents e2fa24e + 96e191a commit 2f34905
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on:
pull_request:
schedule: [ cron: "40 1 * * *" ]

permissions:
contents: read

env:
RUSTFLAGS: -Dwarnings

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo fmt -- --check
- run: cargo build
10 changes: 3 additions & 7 deletions src/lambda_invoker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl LambdaInvoker {
}
}

pub async fn iterate(&self, iterations: u8) -> Result<(), anyhow::Error> {
pub async fn iterate(&self, iterations: u16) -> Result<(), anyhow::Error> {
let config = self.get_function_configuration().await?;
let mut env = config
.environment
Expand Down Expand Up @@ -110,12 +110,8 @@ impl LambdaInvoker {
Some(last_update_status) => {
info!("Checking if last update is successful: {last_update_status}");
match last_update_status {
LastUpdateStatus::Successful => {
Ok(true)
}
LastUpdateStatus::Failed | LastUpdateStatus::InProgress => {
Ok(false)
}
LastUpdateStatus::Successful => Ok(true),
LastUpdateStatus::Failed | LastUpdateStatus::InProgress => Ok(false),
unknown => {
warn!("LastUpdateStatus unknown: {unknown}");
Err(anyhow!("Unknown LastUpdateStatus, fn config is {config:?}"))
Expand Down

0 comments on commit 2f34905

Please sign in to comment.