Skip to content

YDB tests

YDB tests #1297

Workflow file for this run

name: YDB tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '18 4 * * *'
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
RUST_VERSION_OLD: "1.60.0"
RUST_VERSION_NEW: "1.78.0"
jobs:
tests:
strategy:
fail-fast: false
matrix:
rust_version: [ "RUST_VERSION_OLD", "RUST_VERSION_NEW" ]
services:
ydb:
image: cr.yandex/yc/yandex-docker-local-ydb:latest
ports:
- 2135:2135
- 2136:2136
- 8765:8765
volumes:
- /tmp/ydb_certs:/ydb_certs
env:
YDB_USE_IN_MEMORY_PDISKS: true
options: '-h localhost'
runs-on: ubuntu-20.04
steps:
- name: Install rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env[matrix.rust_version] }}
components: clippy
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Rust version
id: rust_version_step
run: |
rustc --version
cargo --version
echo "CARGO_INCREMENTAL=$CARGO_INCREMENTAL"
echo "::set-output name=version::$(rustc --version | cut -d ' ' -f 2)"
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Run tests
env:
YDB_CONNECTION_STRING: grpc://localhost:2136?database=/local
run: cargo test --verbose --workspace -- --include-ignored
- name: Linter
if: matrix.rust_version == 'NEW'
run: |
cargo clippy --workspace --all-targets -- -D warnings