Skip to content

run CI on windows and macos #61

run CI on windows and macos

run CI on windows and macos #61

Workflow file for this run

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-all-databases:
needs: check
name: Run tests with all databases
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
test-all-os:
needs: check
name: Run tests on all operating systems
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-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: cargo test
run: cargo test --workspace
- name: Run examples
run: scripts/gen-examples run