forked from gluesql/gluesql
-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (73 loc) · 2.23 KB
/
rust.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
71
72
73
74
75
76
77
78
79
80
name: Rust
on:
push:
branches: [main, release-*]
paths-ignore:
- 'docs/**'
pull_request:
branches: [main, release-*]
paths-ignore:
- 'docs/**'
env:
CARGO_TERM_COLOR: always
jobs:
clippy_workspace:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Read rust-toolchain file
id: rust-toolchain
run: echo "toolchain=$(cat rust-toolchain)" >> $GITHUB_OUTPUT
- name: Add clippy
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.rust-toolchain.outputs.toolchain }}
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets -- -D warnings
rust_fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Read rust-toolchain file
id: rust-toolchain
run: echo "toolchain=$(cat rust-toolchain)" >> $GITHUB_OUTPUT
- name: Add rustfmt
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.rust-toolchain.outputs.toolchain }}
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: |
cargo fmt -- --check
rust_build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cargo build --all-features --verbose
run_tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: |
cargo test --all-features --lib --bins --tests --examples --verbose -- --skip sled_transaction_timeout
cargo test sled_transaction_timeout --verbose -- --test-threads=1
cargo test --benches
run_examples:
name: Run examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: |
cargo run --package gluesql --example hello_world
cargo run --package gluesql --example api_usage
cargo run --package gluesql --example memory_storage_usage
cargo run --package gluesql --example sled_multi_threaded
cargo run --package gluesql --example using_config