Skip to content

Commit 9a22fe1

Browse files
committed
Initial commit
0 parents  commit 9a22fe1

File tree

9 files changed

+654
-0
lines changed

9 files changed

+654
-0
lines changed

.github/workflows/rust.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
- uses: rustsec/[email protected]
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.pdb
2+
**/*.rs.bk
3+
debug/
4+
node_modules/
5+
target/

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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

0 commit comments

Comments
 (0)