@@ -2,9 +2,9 @@ name: Tests
22
33on :
44 push :
5- branches : [ main, develop ]
5+ branches : [main, develop]
66 pull_request :
7- branches : [ main ]
7+ branches : [main]
88
99env :
1010 CARGO_TERM_COLOR : always
@@ -24,104 +24,104 @@ jobs:
2424 rust : nightly
2525
2626 steps :
27- - uses : actions/checkout@v4
27+ - uses : actions/checkout@v4
2828
29- - name : Install Rust
30- uses : dtolnay/rust-toolchain@master
31- with :
32- toolchain : ${{ matrix.rust }}
33- components : rustfmt, clippy
29+ - name : Install Rust
30+ uses : dtolnay/rust-toolchain@master
31+ with :
32+ toolchain : ${{ matrix.rust }}
33+ components : rustfmt, clippy
3434
35- - name : Cache cargo registry
36- uses : actions/cache@v3
37- with :
38- path : ~/.cargo/registry
39- key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
35+ - name : Cache cargo registry
36+ uses : actions/cache@v3
37+ with :
38+ path : ~/.cargo/registry
39+ key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
4040
41- - name : Cache cargo index
42- uses : actions/cache@v3
43- with :
44- path : ~/.cargo/git
45- key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
41+ - name : Cache cargo index
42+ uses : actions/cache@v3
43+ with :
44+ path : ~/.cargo/git
45+ key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
4646
47- - name : Cache cargo build
48- uses : actions/cache@v3
49- with :
50- path : target
51- key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
47+ - name : Cache cargo build
48+ uses : actions/cache@v3
49+ with :
50+ path : target
51+ key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
5252
53- - name : Check formatting
54- run : cargo fmt -- --check
53+ - name : Check formatting
54+ run : cargo fmt -- --check
5555
56- - name : Lint with clippy
57- run : cargo clippy -- -D warnings
56+ - name : Lint with clippy
57+ run : cargo clippy -- -D warnings
5858
59- - name : Build
60- run : cargo build --verbose
59+ - name : Build
60+ run : cargo build --verbose
6161
62- - name : Run unit tests
63- run : cargo test --lib --verbose
62+ - name : Run unit tests
63+ run : cargo test --lib --verbose
6464
65- - name : Run integration tests
66- run : cargo test --test integration_tests --verbose
65+ - name : Run integration tests
66+ run : cargo test --test integration_tests --verbose
6767
68- - name : Run binary tests
69- run : cargo test --test unit_tests --verbose
68+ - name : Run binary tests
69+ run : cargo test --test unit_tests --verbose
7070
71- - name : Test CLI functionality
72- run : |
73- cargo run -- --help
74- cargo run -- list
75- cargo run -- current
71+ - name : Test CLI functionality
72+ run : |
73+ cargo run -- --help
74+ cargo run -- ls
75+ cargo run -- current
7676
77- - name : Build release
78- run : cargo build --release --verbose
77+ - name : Build release
78+ run : cargo build --release --verbose
7979
8080 coverage :
8181 runs-on : ubuntu-latest
8282 steps :
83- - uses : actions/checkout@v4
83+ - uses : actions/checkout@v4
8484
85- - name : Install Rust
86- uses : dtolnay/rust-toolchain@stable
85+ - name : Install Rust
86+ uses : dtolnay/rust-toolchain@stable
8787
88- - name : Install cargo-tarpaulin
89- run : cargo install cargo-tarpaulin
88+ - name : Install cargo-tarpaulin
89+ run : cargo install cargo-tarpaulin
9090
91- - name : Run tests with coverage
92- run : cargo tarpaulin --out Xml
91+ - name : Run tests with coverage
92+ run : cargo tarpaulin --out Xml
9393
94- - name : Upload coverage to Codecov
95- uses : codecov/codecov-action@v3
96- with :
97- file : ./cobertura.xml
98- flags : rust
99- name : codecov-rust
94+ - name : Upload coverage to Codecov
95+ uses : codecov/codecov-action@v3
96+ with :
97+ file : ./cobertura.xml
98+ flags : rust
99+ name : codecov-rust
100100
101101 security :
102102 runs-on : ubuntu-latest
103103 steps :
104- - uses : actions/checkout@v4
104+ - uses : actions/checkout@v4
105105
106- - name : Install Rust
107- uses : dtolnay/rust-toolchain@stable
106+ - name : Install Rust
107+ uses : dtolnay/rust-toolchain@stable
108108
109- - name : Install cargo-audit
110- run : cargo install cargo-audit
109+ - name : Install cargo-audit
110+ run : cargo install cargo-audit
111111
112- - name : Security audit
113- run : cargo audit
112+ - name : Security audit
113+ run : cargo audit
114114
115115 msrv :
116116 name : Minimum Supported Rust Version
117117 runs-on : ubuntu-latest
118118 steps :
119- - uses : actions/checkout@v4
119+ - uses : actions/checkout@v4
120120
121- - name : Install Rust 1.80
122- uses : dtolnay/rust-toolchain@master
123- with :
124- toolchain : 1.80.0
121+ - name : Install Rust 1.80
122+ uses : dtolnay/rust-toolchain@master
123+ with :
124+ toolchain : 1.80.0
125125
126- - name : Check MSRV
127- run : cargo check
126+ - name : Check MSRV
127+ run : cargo check
0 commit comments