feat: implement EMBP architecture and add integration testing (v0.2.0) #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/johnbasrai/cr8s/rust-dev:1.83.0-rev6 | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Show Rust version | |
| run: | | |
| rustc --version | |
| cargo --version | |
| - 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 unit tests only | |
| run: cargo test --release --quiet --lib --bins | |
| - name: Ensure cargo-lambda 1.8.5 is installed | |
| env: | |
| CARGO_HOME: /home/runner/.cargo | |
| PATH: /home/runner/.cargo/bin:${{ env.PATH }} | |
| run: | | |
| echo "PATH=$PATH" | |
| if ! command -v cargo-lambda &> /dev/null; then | |
| cargo install cargo-lambda --version 1.8.5 | |
| fi | |
| - name: Start lambda runtime in background | |
| run: cargo lambda start --release & | |
| env: | |
| RUST_LOG: info | |
| - name: Wait for lambda runtime to be ready | |
| run: sleep 5 | |
| - name: Run integration tests | |
| run: cargo test --quiet --test integration_tests --release | |
| env: | |
| RUST_LOG: info | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/johnbasrai/cr8s/rust-dev:1.83.0-rev6 | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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: Run Clippy | |
| run: cargo clippy --quiet --all-targets --all-features -- -D warnings | |
| - name: Run audit & outdated | |
| run: cargo audit || cargo outdated || true |