Skip to content

Commit 7470d3d

Browse files
committed
added hk hooks, prettier on configs
Signed-off-by: Adam Poulemanos <[email protected]>
1 parent bef5f0b commit 7470d3d

File tree

18 files changed

+968
-616
lines changed

18 files changed

+968
-616
lines changed

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Set default behavior to automatically normalize line endings
2+
* text=auto
3+
4+
# Force most text files to always use LF
5+
.roomodes text eol=lf
6+
*.astro text eol=lf
7+
*.css text eol=lf
8+
*.csv text eol=lf
9+
*.cts text eol=lf
10+
*.go text eol=lf
11+
*.html text eol=lf
12+
*.ini text eol=lf
13+
*.js text eol=lf
14+
*.json text eol=lf
15+
*.jsx text eol=lf
16+
*.md text eol=lf
17+
*.mdx text eol=lf
18+
*.mts text eol=lf
19+
*.pkl text eol=lf
20+
*.py text eol=lf
21+
*.rs text eol=lf
22+
*.sh text eol=lf
23+
*.svelte text eol=lf
24+
*.svg text eol=lf
25+
*.toml text eol=lf
26+
*.ts text eol=lf
27+
*.tsx text eol=lf
28+
*.txt text eol=lf
29+
*.xml text eol=lf
30+
*.yaml text eol=lf
31+
*.yml text eol=lf
32+
.git* text eol=LF
33+
LICENSE text eol=lf
34+
35+
# Force batch files to use CRLF (Windows scripts)
36+
*.bat text eol=crlf
37+
*.ps* text eol=crlf
38+
39+
# Treat these as binary (no line ending conversion)
40+
*.aac binary
41+
*.avif binary
42+
*.docx binary
43+
*.eot binary
44+
*.exe binary
45+
*.flac binary
46+
*.ico binary
47+
*.jpg binary
48+
*.m4a binary
49+
*.mp3 binary
50+
*.mp4 binary
51+
*.ogg binary
52+
*.otf binary
53+
*.pdf binary
54+
*.png binary
55+
*.pptx binary
56+
*.ttf binary
57+
*.wav binary
58+
*.webm binary
59+
*.webp binary
60+
*.woff binary
61+
*.woff2 binary
62+
*.xlsx binary
63+
*.zip binary

.github/workflows/ci.yml

Lines changed: 90 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,97 @@
11
name: CI
22

33
on:
4-
push:
5-
branches: [ main, develop ]
6-
pull_request:
7-
branches: [ main, develop ]
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
88

99
env:
10-
CARGO_TERM_COLOR: always
10+
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
test:
14-
name: Test Suite
15-
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
rust:
19-
- stable
20-
- beta
21-
- nightly
22-
steps:
23-
- uses: actions/checkout@v4
24-
with:
25-
submodules: recursive
26-
27-
- name: Install Rust
28-
uses: dtolnay/rust-toolchain@master
29-
with:
30-
toolchain: ${{ matrix.rust }}
31-
components: rustfmt, clippy
32-
33-
- name: Cache cargo registry
34-
uses: actions/cache@v4
35-
with:
36-
path: ~/.cargo/registry
37-
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
38-
39-
- name: Cache cargo index
40-
uses: actions/cache@v4
41-
with:
42-
path: ~/.cargo/git
43-
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
44-
45-
- name: Cache cargo build
46-
uses: actions/cache@v4
47-
with:
48-
path: target
49-
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
50-
51-
- name: Check formatting
52-
run: cargo fmt --all -- --check
53-
54-
- name: Run clippy
55-
run: cargo clippy --all-targets --all-features -- -D warnings
56-
57-
- name: Build
58-
run: cargo build --verbose
59-
60-
- name: Run tests
61-
run: cargo test --verbose
62-
63-
- name: Run tests with all features
64-
run: cargo test --all-features --verbose
65-
66-
- name: Run tests without default features
67-
run: cargo test --no-default-features --verbose
68-
69-
security_audit:
70-
name: Security Audit
71-
runs-on: ubuntu-latest
72-
steps:
73-
- uses: actions/checkout@v4
74-
- uses: rustsec/[email protected]
75-
with:
76-
token: ${{ secrets.GITHUB_TOKEN }}
77-
78-
coverage:
79-
name: Code Coverage
80-
runs-on: ubuntu-latest
81-
steps:
82-
- uses: actions/checkout@v4
83-
with:
84-
submodules: recursive
85-
86-
- name: Install Rust
87-
uses: dtolnay/rust-toolchain@stable
88-
with:
89-
components: llvm-tools-preview
90-
91-
- name: Install cargo-llvm-cov
92-
uses: taiki-e/install-action@cargo-llvm-cov
93-
94-
- name: Generate code coverage
95-
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
96-
97-
- name: Upload coverage to Codecov
98-
uses: codecov/codecov-action@v4
99-
with:
100-
files: lcov.info
101-
fail_ci_if_error: true
102-
13+
test:
14+
name: Test Suite
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
rust:
19+
- stable
20+
- beta
21+
- nightly
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
submodules: recursive
26+
27+
- name: Install Rust
28+
uses: dtolnay/rust-toolchain@master
29+
with:
30+
toolchain: ${{ matrix.rust }}
31+
components: rustfmt, clippy
32+
33+
- name: Cache cargo registry
34+
uses: actions/cache@v4
35+
with:
36+
path: ~/.cargo/registry
37+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
38+
39+
- name: Cache cargo index
40+
uses: actions/cache@v4
41+
with:
42+
path: ~/.cargo/git
43+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
44+
45+
- name: Cache cargo build
46+
uses: actions/cache@v4
47+
with:
48+
path: target
49+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
50+
51+
- name: Set up mise
52+
run: |
53+
curl https://mise.run | sh
54+
echo "$HOME/.local/share/mise/bin" >> $GITHUB_PATH
55+
echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH
56+
MISE="$HOME/.local/bin/mise"
57+
$MISE trust -y
58+
$MISE install -y
59+
$MISE reshim
60+
hk install --mise
61+
62+
- name: Run hk ci workflow
63+
run: hk ci
64+
65+
security_audit:
66+
name: Security Audit
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v4
70+
- uses: rustsec/[email protected]
71+
with:
72+
token: ${{ secrets.GITHUB_TOKEN }}
73+
74+
coverage:
75+
name: Code Coverage
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@v4
79+
with:
80+
submodules: recursive
81+
82+
- name: Install Rust
83+
uses: dtolnay/rust-toolchain@stable
84+
with:
85+
components: llvm-tools-preview
86+
87+
- name: Install cargo-llvm-cov
88+
uses: taiki-e/install-action@cargo-llvm-cov
89+
90+
- name: Generate code coverage
91+
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
92+
93+
- name: Upload coverage to Codecov
94+
uses: codecov/codecov-action@v4
95+
with:
96+
files: lcov.info
97+
fail_ci_if_error: true

.github/workflows/docs.yml

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
11
name: Documentation
22

33
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
88

99
env:
10-
CARGO_TERM_COLOR: always
10+
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
docs:
14-
name: Build and Deploy Documentation
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v4
18-
with:
19-
submodules: recursive
13+
docs:
14+
name: Build and Deploy Documentation
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
submodules: recursive
2020

21-
- name: Install Rust
22-
uses: dtolnay/rust-toolchain@stable
21+
- name: Install Rust
22+
uses: dtolnay/rust-toolchain@stable
2323

24-
- name: Cache cargo registry
25-
uses: actions/cache@v4
26-
with:
27-
path: ~/.cargo/registry
28-
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
24+
- name: Cache cargo registry
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/.cargo/registry
28+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
2929

30-
- name: Cache cargo index
31-
uses: actions/cache@v4
32-
with:
33-
path: ~/.cargo/git
34-
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
30+
- name: Cache cargo index
31+
uses: actions/cache@v4
32+
with:
33+
path: ~/.cargo/git
34+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
3535

36-
- name: Cache cargo build
37-
uses: actions/cache@v4
38-
with:
39-
path: target
40-
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
36+
- name: Cache cargo build
37+
uses: actions/cache@v4
38+
with:
39+
path: target
40+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
4141

42-
- name: Build documentation
43-
run: cargo doc --all-features --no-deps
42+
- name: Build documentation
43+
run: cargo doc --all-features --no-deps
4444

45-
- name: Deploy to GitHub Pages
46-
if: github.ref == 'refs/heads/main'
47-
uses: peaceiris/actions-gh-pages@v4
48-
with:
49-
github_token: ${{ secrets.GITHUB_TOKEN }}
50-
publish_dir: ./target/doc
51-
force_orphan: true
45+
- name: Deploy to GitHub Pages
46+
if: github.ref == 'refs/heads/main'
47+
uses: peaceiris/actions-gh-pages@v4
48+
with:
49+
github_token: ${{ secrets.GITHUB_TOKEN }}
50+
publish_dir: ./target/doc
51+
force_orphan: true
5252

53-
docs_rs_check:
54-
name: Check docs.rs compatibility
55-
runs-on: ubuntu-latest
56-
steps:
57-
- uses: actions/checkout@v4
58-
with:
59-
submodules: recursive
53+
docs_rs_check:
54+
name: Check docs.rs compatibility
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
with:
59+
submodules: recursive
6060

61-
- name: Install Rust nightly
62-
uses: dtolnay/rust-toolchain@nightly
61+
- name: Install Rust nightly
62+
uses: dtolnay/rust-toolchain@nightly
6363

64-
- name: Install cargo-docs-rs
65-
run: cargo install cargo-docs-rs
64+
- name: Install cargo-docs-rs
65+
run: cargo install cargo-docs-rs
6666

67-
- name: Check docs.rs build
68-
run: cargo docs-rs
67+
- name: Check docs.rs build
68+
run: cargo docs-rs

0 commit comments

Comments
 (0)