Skip to content

Commit 2f34905

Browse files
authored
Merge pull request #3 from exoego/ci
setup CI
2 parents e2fa24e + 96e191a commit 2f34905

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

.github/workflows/ci.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
schedule: [ cron: "40 1 * * *" ]
6+
7+
permissions:
8+
contents: read
9+
10+
env:
11+
RUSTFLAGS: -Dwarnings
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 45
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: dtolnay/rust-toolchain@stable
20+
- uses: Swatinem/rust-cache@v2
21+
- run: cargo fmt -- --check
22+
- run: cargo build

src/lambda_invoker.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl LambdaInvoker {
2323
}
2424
}
2525

26-
pub async fn iterate(&self, iterations: u8) -> Result<(), anyhow::Error> {
26+
pub async fn iterate(&self, iterations: u16) -> Result<(), anyhow::Error> {
2727
let config = self.get_function_configuration().await?;
2828
let mut env = config
2929
.environment
@@ -110,12 +110,8 @@ impl LambdaInvoker {
110110
Some(last_update_status) => {
111111
info!("Checking if last update is successful: {last_update_status}");
112112
match last_update_status {
113-
LastUpdateStatus::Successful => {
114-
Ok(true)
115-
}
116-
LastUpdateStatus::Failed | LastUpdateStatus::InProgress => {
117-
Ok(false)
118-
}
113+
LastUpdateStatus::Successful => Ok(true),
114+
LastUpdateStatus::Failed | LastUpdateStatus::InProgress => Ok(false),
119115
unknown => {
120116
warn!("LastUpdateStatus unknown: {unknown}");
121117
Err(anyhow!("Unknown LastUpdateStatus, fn config is {config:?}"))

0 commit comments

Comments
 (0)