-
Notifications
You must be signed in to change notification settings - Fork 18
70 lines (59 loc) · 1.56 KB
/
rust-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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