Skip to content

Commit f477b67

Browse files
ci: improve workflows (#120)
1 parent c8f46a4 commit f477b67

10 files changed

Lines changed: 102 additions & 35 deletions

File tree

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
- name: Set up Rust toolchain
3838
uses: actions-rust-lang/setup-rust-toolchain@v1
3939
with:
40-
components: clippy, rustfmt
4140
target: wasm32-unknown-unknown
4241

4342
- name: Install Cargo Binary Install

.github/workflows/website.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
- name: Set up Rust toolchain
2424
uses: actions-rust-lang/setup-rust-toolchain@v1
2525
with:
26-
components: clippy, rustfmt
2726
target: wasm32-unknown-unknown
2827

2928
- name: Install Cargo Binary Install
@@ -49,7 +48,6 @@ jobs:
4948
- name: Set up Rust toolchain
5049
uses: actions-rust-lang/setup-rust-toolchain@v1
5150
with:
52-
components: clippy, rustfmt
5351
target: wasm32-unknown-unknown
5452

5553
- name: Install Cargo Binary Install

.pre-commit-config.yaml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
11
repos:
2+
- repo: https://github.com/pre-commit/mirrors-prettier
3+
rev: v3.1.0
4+
hooks:
5+
- id: prettier
6+
language: node
7+
additional_dependencies:
8+
- prettier@^3.6.2
9+
- prettier-plugin-tailwindcss@^0.6.6
10+
211
- repo: https://github.com/doublify/pre-commit-rust
312
rev: v1.0
413
hooks:
514
- id: fmt
615
- id: clippy
716

8-
- repo: https://github.com/pre-commit/mirrors-prettier
9-
rev: v3.1.0
17+
- repo: https://github.com/EmbarkStudios/cargo-deny
18+
rev: 0.18.4
1019
hooks:
11-
- id: prettier
12-
language: node
13-
additional_dependencies:
14-
- prettier@^3.2.5
15-
- prettier-plugin-tailwindcss@^0.6.0
20+
- id: cargo-deny
21+
22+
# - repo: https://github.com/bnjbvr/cargo-machete
23+
# rev: ba1bcd4
24+
# hooks:
25+
# - id: cargo-machete
26+
- repo: local
27+
hooks:
28+
- id: cargo-machete
29+
name: cargo-machete
30+
language: rust
31+
entry: cargo machete
32+
types: [file, toml]
33+
files: Cargo\.(toml|lock)
34+
pass_filenames: false
35+
36+
- repo: https://github.com/DevinR528/cargo-sort
37+
rev: v2.0.1
38+
hooks:
39+
- id: cargo-sort
40+
args: ['--workspace']

.prettierrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
"bracketSpacing": false,
33
"printWidth": 120,
44
"singleQuote": true,
5-
"tabWidth": 4,
6-
"trailingComma": "none"
5+
"tabWidth": 4
76
}

Cargo.lock

Lines changed: 34 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

book-example/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ license.workspace = true
99
repository.workspace = true
1010
version.workspace = true
1111

12+
[features]
13+
default = ["button"]
14+
button = []
15+
1216
[dependencies]
1317
console_error_panic_hook = "0.1.7"
1418
console_log = "1.0.0"
1519
leptos = { version = "0.8.0", features = ["csr"] }
1620
log.workspace = true
17-
18-
[features]
19-
default = ["button"]
20-
button = []

deny.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[graph]
2+
all-features = true
3+
4+
[advisories]
5+
ignore = [
6+
{ id = "RUSTSEC-2024-0436", reason = "No maintained version available for `paste`." },
7+
]
8+
9+
[bans]
10+
allow-wildcard-paths = true
11+
multiple-versions = "allow"
12+
wildcards = "deny"
13+
14+
[licenses]
15+
allow = [
16+
"Apache-2.0",
17+
"BSD-2-Clause",
18+
"BSD-3-Clause",
19+
"BSL-1.0",
20+
"CC0-1.0",
21+
"ISC",
22+
"MIT",
23+
"MPL-2.0",
24+
"Unicode-3.0",
25+
"Zlib",
26+
]
27+
confidence-threshold = 1.0
28+
29+
[sources]
30+
unknown-git = "deny"
31+
unknown-registry = "deny"

packages/mdbook-plugin-utils/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ version.workspace = true
1212
[dependencies]
1313
anyhow.workspace = true
1414
log.workspace = true
15-
mdbook.workspace = true
1615
pulldown-cmark.workspace = true
1716
test-log.workspace = true

packages/mdbook-tabs/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,3 @@ semver.workspace = true
2121
serde.workspace = true
2222
serde-keyvalue = "0.1.0"
2323
serde_json.workspace = true
24-
test-log.workspace = true
25-
toml = "0.9.0"

packages/mdbook-trunk/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,4 @@ pulldown-cmark.workspace = true
2525
semver.workspace = true
2626
serde.workspace = true
2727
serde_json.workspace = true
28-
test-log.workspace = true
2928
toml = "0.9.0"

0 commit comments

Comments
 (0)