test: cache #29
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: Rust Cache and Test | |
on: | |
push: | |
jobs: | |
test: | |
# sadly, for now we have to "rebuild" for the coverage | |
runs-on: ubuntu-latest | |
services: | |
localstack: | |
image: localstack/localstack | |
env: | |
SERVICES: s3, sqs | |
DEFAULT_REGION: us-east-1 | |
AWS_ACCESS_KEY_ID: "AWS_ACCESS_KEY_ID" | |
AWS_SECRET_ACCESS_KEY: "AWS_SECRET_ACCESS_KEY" | |
ports: | |
- 4566:4566 | |
mongodb: | |
image: mongo:latest | |
ports: | |
- 27017:27017 | |
name: Cache and Test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Clean workspace | |
run: | | |
cargo clean --doc | |
- name: Run tests | |
run: cargo llvm-cov nextest --release --lcov --output-path lcov.info --test-threads=1 | |
- name: Upload coverage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: code-coverage-report | |
path: lcov.info |