Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update and clean up #131

Merged
merged 4 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/workflows/book.yml

This file was deleted.

54 changes: 50 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
cd "$PKG"
echo "Testing: $PKG"
cargo fmt -- --check
cd -
cd - > /dev/null
done

MSRV:
Expand All @@ -83,7 +83,53 @@ jobs:
- run: cargo check --lib -p rinja --all-features

Audit:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1

Book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: taiki-e/install-action@v2
with:
tool: mdbook
- run: mdbook build book

DevSkim:
name: DevSkim
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
- uses: actions/checkout@v4

- name: Run DevSkim scanner
uses: microsoft/DevSkim-Action@v1

- name: Upload DevSkim scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: devskim-results.sarif

CargoSort:
name: Check order in Cargo.toml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: cargo-sort
- run: |
set -eu
for PKG in \
rinja rinja_actix rinja_axum rinja_derive rinja_derive_standalone \
rinja_parser rinja_rocket rinja_warp testing
do
cd "$PKG"
cargo sort --check --check-format --grouped
cd - > /dev/null
done
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[licenses]
version = 2
allow = ["Apache-2.0", "BSD-2-Clause", "BSD-3-Clause", "ISC", "MIT", "Unicode-3.0", "Unicode-DFS-2016"]
allow = ["Apache-2.0", "BSD-2-Clause", "MIT", "Unicode-DFS-2016"]
private = { ignore = true }

[[licenses.clarify]]
Expand Down
12 changes: 6 additions & 6 deletions rinja/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ readme = "../README.md"
edition = "2021"
rust-version = "1.71"

[package.metadata.docs.rs]
features = ["default", "serde_json"]
rustdoc-args = ["--generate-link-to-definition", "--cfg=docsrs"]

[badges]
maintenance = { status = "actively-developed" }

Expand All @@ -34,14 +38,14 @@ with-warp = ["rinja_derive/with-warp"]
[dependencies]
rinja_derive = { version = "=0.3.0", path = "../rinja_derive" }

itoa = "1.0.11"

humansize = { version = "2", optional = true }
num-traits = { version = "0.2.6", optional = true }
percent-encoding = { version = "2.1.0", optional = true }
serde = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }

itoa = "1.0.11"

[dev-dependencies]
criterion = "0.5"

Expand All @@ -53,7 +57,3 @@ required-features = ["serde_json"]
[[bench]]
name = "escape"
harness = false

[package.metadata.docs.rs]
features = ["default", "serde_json"]
rustdoc-args = ["--generate-link-to-definition", "--cfg=docsrs"]
1 change: 1 addition & 0 deletions rinja_actix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rust-version = "1.71"

[dependencies]
rinja = { version = "0.3.0", path = "../rinja", default-features = false, features = ["with-actix-web"] }

actix-web = { version = "4", default-features = false }

[dev-dependencies]
Expand Down
1 change: 1 addition & 0 deletions rinja_axum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ readme = "README.md"

[dependencies]
rinja = { version = "0.3.0", path = "../rinja", default-features = false, features = ["with-axum"] }

axum-core = "0.4"
http = "1.0"

Expand Down
5 changes: 3 additions & 2 deletions rinja_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,20 @@ with-warp = []
parser = { package = "rinja_parser", version = "=0.3.0", path = "../rinja_parser" }

basic-toml = { version = "0.1.1", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }

memchr = "2"
mime = "0.3"
mime_guess = "2"
once_map = "0.4.18"
proc-macro2 = "1"
quote = "1"
serde = { version = "1.0", optional = true, features = ["derive"] }
syn = "2.0.3"

[dev-dependencies]
console = "0.15.8"
similar = "2.6.0"
prettyplease = "0.2.20"
similar = "2.6.0"
syn = { version = "2.0.3", features = ["full"] }

[lints.rust]
Expand Down
8 changes: 4 additions & 4 deletions rinja_derive_standalone/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ with-warp = []
parser = { package = "rinja_parser", version = "=0.3.0", path = "../rinja_parser" }

basic-toml = { version = "0.1.1", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }

memchr = "2"
mime = "0.3"
mime_guess = "2"
once_map = "0.4.18"
proc-macro2 = "1"
quote = "1"
serde = { version = "1.0", optional = true, features = ["derive"] }
syn = "2"

[dev-dependencies]
criterion = "0.5"

console = "0.15.8"
similar = "2.6.0"
criterion = "0.5"
prettyplease = "0.2.20"
similar = "2.6.0"
syn = { version = "2.0.3", features = ["full"] }

[[bench]]
Expand Down
1 change: 1 addition & 0 deletions rinja_rocket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rust-version = "1.71"

[dependencies]
rinja = { version = "0.3.0", path = "../rinja", default-features = false, features = ["with-rocket"] }

rocket = { version = "0.5", default-features = false }

[dev-dependencies]
Expand Down
1 change: 1 addition & 0 deletions rinja_warp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rust-version = "1.71"

[dependencies]
rinja = { version = "0.3.0", path = "../rinja", default-features = false, features = ["with-warp"] }

warp = { version = "0.3", default-features = false }

[dev-dependencies]
Expand Down
4 changes: 3 additions & 1 deletion testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ serde_json = ["dep:serde_json", "rinja/serde_json"]

[dependencies]
rinja = { path = "../rinja", version = "0.3.0" }

serde_json = { version = "1.0", optional = true }

[dev-dependencies]
rinja = { path = "../rinja", version = "0.3.0", features = ["serde_json"] }

criterion = "0.5"
phf = { version = "0.11", features = ["macros" ]}
phf = { version = "0.11", features = ["macros" ] }
trybuild = "1.0.76"

[[bench]]
Expand Down
2 changes: 1 addition & 1 deletion testing/tests/filter_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ fn filter_block_include() {
<body class=""><h1>Metadata</h1>


99</body>
100</body>
</html>"#
);
}
Expand Down
1 change: 1 addition & 0 deletions tomlfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
table_order = ["workspace", "package", "badges", "lib", "features", "dependencies", "build-dependencies", "dev-dependencies", "bench"]
Loading