Merge pull request #131 from Kijewski/pr-ci

ci: update and clean up
This commit is contained in:
Guillaume Gomez 2024-08-13 20:19:13 +02:00 committed by GitHub
commit c0690865a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 73 additions and 39 deletions

View File

@ -1,20 +0,0 @@
name: Build book
on:
push:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
- run: mdbook build book
- run: cp book/404.html book/book/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book

View File

@ -70,7 +70,7 @@ jobs:
cd "$PKG"
echo "Testing: $PKG"
cargo fmt -- --check
cd -
cd - > /dev/null
done
MSRV:
@ -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
- 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
- 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

View File

@ -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]]

View File

@ -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" }
@ -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"
@ -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"]

View File

@ -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]

View File

@ -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"

View File

@ -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]

View File

@ -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]]

View File

@ -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]

View File

@ -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]

View File

@ -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]]

View File

@ -233,7 +233,7 @@ fn filter_block_include() {
<body class=""><h1>Metadata</h1>
99</body>
100</body>
</html>"#
);
}

1
tomlfmt.toml Normal file
View File

@ -0,0 +1 @@
table_order = ["workspace", "package", "badges", "lib", "features", "dependencies", "build-dependencies", "dev-dependencies", "bench"]