Merge pull request #329 from barshaul/update_redisrs #675
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 tests | |
on: | |
push: | |
branches: [main] | |
paths: | |
- logger_core/** | |
- babushka-core/** | |
- submodules/** | |
pull_request: | |
paths: | |
- logger_core/** | |
- babushka-core/** | |
- submodules/** | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
redis: | |
- 6.2.13 | |
- 7.0.12 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install redis | |
uses: ./.github/workflows/install-redis | |
with: | |
redis-version: ${{ matrix.redis }} | |
- name: Install protoc | |
run: | | |
sudo apt update | |
sudo apt install protobuf-compiler | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v1 | |
- name: Run tests | |
working-directory: ./babushka-core | |
run: cargo test -- --nocapture --test-threads=1 # TODO remove the concurrency limit after we fix test flakyness. | |
- name: Run logger tests | |
working-directory: ./logger_core | |
run: cargo test -- --nocapture --test-threads=1 | |
- name: Check features | |
working-directory: ./babushka-core | |
run: | | |
cargo check --benches --all-features | |
cargo check --no-default-features | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: ./.github/workflows/lint-rust | |
with: | |
cargo-toml-folder: ./babushka-core | |
- uses: ./.github/workflows/lint-rust | |
with: | |
cargo-toml-folder: ./logger_core | |
- uses: ./.github/workflows/lint-rust | |
with: | |
cargo-toml-folder: ./benchmarks/rust |