File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ tests :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v2
14+ - name : Cache .cargo and target
15+ uses : actions/cache@v2
16+ with :
17+ path : |
18+ ~/.cargo
19+ ./target
20+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
21+ restore-keys : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
22+ - name : Install Rust toolchain
23+ uses : actions-rs/toolchain@v1
24+ with :
25+ toolchain : stable
26+ profile : minimal
27+ default : true
28+ - name : Stable Build
29+ uses : actions-rs/cargo@v1
30+ with :
31+ command : build
32+ args : --all-features
33+ - name : Tests
34+ uses : actions-rs/cargo@v1
35+ with :
36+ command : test
37+ args : --all-features
Original file line number Diff line number Diff line change 1+ name : Lint checks
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ lint :
11+ runs-on : ubuntu-latest
12+ env :
13+ TZ : " /usr/share/zoneinfo/your/location"
14+ steps :
15+ - uses : actions/checkout@v2
16+ - name : Cache .cargo and target
17+ uses : actions/cache@v2
18+ with :
19+ path : |
20+ ~/.cargo
21+ ./target
22+ key : ${{ runner.os }}-lint-cargo-${{ hashFiles('**/Cargo.toml') }}
23+ restore-keys : ${{ runner.os }}-lint-cargo-${{ hashFiles('**/Cargo.toml') }}
24+ - name : Install Rust toolchain
25+ uses : actions-rs/toolchain@v1
26+ with :
27+ toolchain : stable
28+ profile : minimal
29+ default : true
30+ - run : rustup component add rustfmt
31+ - name : Check formt
32+ uses : actions-rs/cargo@v1
33+ with :
34+ command : fmt
35+ args : --all -- --check
36+ - run : rustup component add clippy
37+ - name : Run clippy
38+ uses : actions-rs/cargo@v1
39+ with :
40+ command : clippy
41+ args : --all-features -- -Drust-2018-idioms -Dwarnings
Original file line number Diff line number Diff line change 1+ /target
2+ Cargo.lock
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " typesense"
3+ version = " 0.1.0"
4+ authors = [" Typesense <contact@typesense.org>" ]
5+ edition = " 2018"
6+
7+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8+
9+ [dependencies ]
Original file line number Diff line number Diff line change 1+ #[ cfg( test) ]
2+ mod tests {
3+ #[ test]
4+ fn it_works ( ) {
5+ assert_eq ! ( 2 + 2 , 4 ) ;
6+ }
7+ }
You can’t perform that action at this time.
0 commit comments