File tree Expand file tree Collapse file tree 9 files changed +654
-0
lines changed
Expand file tree Collapse file tree 9 files changed +654
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Rust
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ tags :
7+ - ' *'
8+ pull_request :
9+ branches : [ "main" ]
10+
11+ env :
12+ CARGO_TERM_COLOR : always
13+
14+ jobs :
15+ build :
16+
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - uses : actions/checkout@v4
21+
22+ - name : Caching objects
23+ id : cache-objects
24+ uses : actions/cache@v4
25+ with :
26+ path : |
27+ ~/.cargo
28+ ${{ github.workspace }}/target
29+ key : ${{ runner.os }}-rust-objects
30+
31+ - name : pre-commit
32+ run : |
33+ pip install pre-commit
34+ pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks
35+ pre-commit run --all-files
36+
37+ - name : Build
38+ run : cargo build --verbose
39+
40+ - name : Run tests
41+ run : cargo test --verbose
42+
43+ - name : Code coverage
44+ run : |
45+ cargo install cargo-llvm-cov
46+ # rustup component add llvm-tools-preview --toolchain stable-x86_64-unknown-linux-gnu
47+ cargo llvm-cov
48+
49+ # - name: Install Miri
50+ # run: |
51+ # rustup toolchain install nightly --component miri
52+ # rustup override set nightly
53+ # cargo miri setup
54+ # - name: Test with Miri
55+ # run: cargo miri test
Original file line number Diff line number Diff line change 1+ name : Security audit
2+ on :
3+ push :
4+ paths :
5+ - ' **/Cargo.toml'
6+ - ' **/Cargo.lock'
7+ jobs :
8+ security_audit :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ 13+ with :
14+ token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ * .pdb
2+ ** /* .rs.bk
3+ debug /
4+ node_modules /
5+ target /
Original file line number Diff line number Diff line change 1+ repos :
2+ - repo : https://github.com/pre-commit/pre-commit-hooks
3+ rev : v5.0.0
4+ hooks :
5+ - id : check-byte-order-marker
6+ - id : check-case-conflict
7+ - id : check-case-conflict
8+ - id : check-merge-conflict
9+ - id : check-symlinks
10+ - id : check-toml
11+ - id : check-yaml
12+ - id : end-of-file-fixer
13+ - id : mixed-line-ending
14+ - id : trailing-whitespace
15+ - repo : local
16+ hooks :
17+ - id : fmt
18+ name : fmt
19+ description : Format files with cargo fmt.
20+ entry : cargo fmt --
21+ language : system
22+ files : \.rs$
23+ args : []
24+ - id : cargo-check
25+ name : cargo check
26+ description : Check the package for errors.
27+ entry : cargo check
28+ language : system
29+ files : \.rs$
30+ pass_filenames : false
31+ args : []
32+ - id : cargo-clippy
33+ name : cargo clippy
34+ description : Run the Clippy linter on the package.
35+ entry : cargo clippy -- -D warnings
36+ language : system
37+ files : \.rs$
38+ pass_filenames : false
You can’t perform that action at this time.
0 commit comments