FIX: Changes to user name should match example #70
Workflow file for this run
This file contains 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: Cargo Build & Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: -D warnings | |
jobs: | |
check: | |
name: cargo check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: ${{ github.ref == 'refs/heads/main' }} | |
- name: cargo check | |
run: cargo check --workspace --all-features | |
- name: cargo fmt | |
run: cargo fmt --all --check | |
test-stable: | |
needs: check | |
name: cargo test | |
runs-on: ubuntu-latest | |
env: | |
AWS_ENDPOINT_URL_DYNAMODB: http://localhost:8000 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: ${{ github.ref == 'refs/heads/main' }} | |
- name: Start dynamodb-local | |
run: sudo docker run --name dynamodb -d -p 8000:8000 amazon/dynamodb-local:latest -jar DynamoDBLocal.jar -port 8000 | |
- name: cargo test | |
run: cargo test --workspace --all-features | |
gen-examples: | |
needs: check | |
name: Generate and check example code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: ${{ github.ref == 'refs/heads/main' }} | |
- name: scripts/gen-examples | |
run: scripts/gen-examples |