Skip to content

Commit f158a3f

Browse files
authored
Merge pull request #1 from jifalops/pr-test
test before deploy, test PRs.
2 parents 464eedf + d212cd4 commit f158a3f

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.github/workflows/deploy_lambda.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
# AWS Example SAM Deploy: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/deploying-using-github.html
2+
# Cargo Lambda example: https://www.cargo-lambda.info/guide/getting-started.html#github-actions
3+
name: Deploy Lambda
14
on:
25
push:
36
branches:
47
- main
8+
paths:
9+
- '**/src/**'
10+
- '**/Cargo.toml'
511
jobs:
612
sam-deploy:
713
runs-on: ubuntu-latest
@@ -12,6 +18,8 @@ jobs:
1218
uses: dtolnay/rust-toolchain@stable
1319
with:
1420
targets: aarch64-unknown-linux-gnu
21+
- name: Run tests
22+
run: cargo test --release --features lambda
1523
- name: Install Zig toolchain
1624
uses: korandoru/setup-zig@v1
1725
with:

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Test
2+
on:
3+
pull_request:
4+
branches: main
5+
paths:
6+
- '**/src/**'
7+
- '**/Cargo.toml'
8+
jobs:
9+
cargo-test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Install Rust toolchain
14+
uses: dtolnay/rust-toolchain@stable
15+
- name: Run tests
16+
run: cargo test

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# API Rust
22

3+
[![.github/workflows/test.yml](https://github.com/jifalops/api-rust/actions/workflows/test.yml/badge.svg)](https://github.com/jifalops/api-rust/actions/workflows/test.yml)
4+
5+
[![.github/workflows/deploy_lambda.yml](https://github.com/jifalops/api-rust/actions/workflows/deploy_lambda.yml/badge.svg)](https://github.com/jifalops/api-rust/actions/workflows/deploy_lambda.yml)
6+
37
A template repo for building a Rust/Axum API using a dev-container.
48

59
## Deploy

0 commit comments

Comments
 (0)