Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 6 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,19 @@ on:
branches: [ main ]

env:
CARGO_TERM_COLOR: always
CARGO_TERM_COLOR: never

jobs:
test:
name: Test
runs-on: ubuntu-latest

env:
COMPOSE_BAKE: true

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Cache Cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Check formatting
run: cargo fmt --check

- name: Build release
run: cargo build --release --quiet

- name: Run tests
run: cargo test --release --quiet
- name: Run build and test script
run: ./scripts/build.sh
36 changes: 35 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,41 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and

## [Unreleased]

- Awaiting license and attribution confirmation from the original author
## [0.2.0] – 2025-06-28

### Added

* **EMBP Architecture**: Adopted Explicit Module Boundary Pattern for clean crate structure

* Created `mod.rs` gateways across all key modules (`domain/`, `repository/`, etc.)
* Improved encapsulation, import hygiene, and module boundaries
* **Docker-Based Development Workflow**:

* Added Docker Compose setup with Postgres and Redis
* Hot-reload development via volume mounts
* Introduced `scripts/build.sh` for unified format/lint/test/build pipeline
* **Standardized CI Pipeline**:

* GitHub Actions CI mirrors local container-based workflow
* Includes clippy, rustfmt, unit tests, and integration tests
* Added containerized end-to-end tests using `cargo lambda`
* **Toolchain Pinning**: Rust version pinned to 1.85 for consistency

### Changed

* CI and local development now fully containerized
* Replaced fragile curl healthchecks with robust netcat-based port checks

### Fixed

* Integration test flakiness due to HashMap ordering:

* Added order-agnostic assertions
* Ensured reliable deduplication across input variants

### ⚠️ Breaking Changes

* Local development now **requires Docker**; native Rust-only workflow is no longer supported

---

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aws-lambda-action-filter"
version = "0.1.1"
version = "0.2.0"
edition = "2021"

[dependencies]
Expand All @@ -11,5 +11,4 @@ serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }

tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
28 changes: 28 additions & 0 deletions Dockerfile.lambda-runtime
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM rust:1.85-slim

# Install system deps for building Rust packages and running cargo-lambda
RUN apt-get update && apt-get install -y \
build-essential \
libssl-dev \
pkg-config \
curl \
ca-certificates \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Add cargo bin path explicitly
ENV PATH="/usr/local/cargo/bin:${PATH}"

# Install rustfmt component
RUN rustup component add rustfmt

# Install cargo-lambda
RUN cargo install cargo-lambda --version 1.8.5 --locked --quiet

# Default user
RUN useradd -m dev
WORKDIR /app

USER root

# Entry point overriden by docker-compose.yml
CMD [ "bash" ]
Loading