forked from gluesql/gluesql
-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (99 loc) · 3.13 KB
/
rust.yml
File metadata and controls
110 lines (99 loc) · 3.13 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Rust
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
clippy_root:
name: Clippy (root)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add clippy
uses: actions-rs/toolchain@v1.0.6
with:
profile: minimal
default: true
components: clippy
- run: cargo clippy -- -D warnings
clippy_core:
name: Clippy (core)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add clippy
uses: actions-rs/toolchain@v1.0.6
with:
profile: minimal
default: true
components: clippy
- run: |
cd core
cargo clippy --no-default-features -- -D warnings
cargo clippy --no-default-features --features metadata -- -D warnings
cargo clippy --no-default-features --features alter-table -- -D warnings
cargo clippy --no-default-features --features index -- -D warnings
cargo clippy --no-default-features --features transaction -- -D warnings
cargo clippy --no-default-features --features "alter-table index" -- -D warnings
cargo clippy --no-default-features --features "alter-table transaction" -- -D warnings
cargo clippy --no-default-features --features "index transaction" -- -D warnings
cargo clippy --no-default-features --features "alter-table index transaction" -- -D warnings
cargo clippy --all-features --all-targets -- -D warnings
cd ../
rust_fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add rustfmt
uses: actions-rs/toolchain@v1.0.6
with:
profile: minimal
default: true
components: rustfmt
- run: |
cargo fmt -- --check
rust_build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo build --all-features --verbose
gluesql_js_build:
name: Build (gluesql-js)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Set up wasm pack
uses: jetli/wasm-pack-action@v0.3.0
- run: |
cd gluesql-js/web
yarn install
yarn build
cd ../../
run_tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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
- run: |
cargo run --package gluesql --example hello_world
cargo run --package gluesql --example api_usage
cargo run --package gluesql --example sled_multi_threaded
cargo run --package gluesql --example using_config