-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rename
Chain
struct to Middlewares
- Improve documentation and fix all doc examples - MSRV 1.56.0 - Update dependencies - Addci pipelines
- Loading branch information
Showing
11 changed files
with
334 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github: joseluisq | ||
custom: paypal.me/joseluisqs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: audit | ||
on: | ||
schedule: | ||
- cron: '20 01 * * *' # Every day at 01:20 UTC | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "**/Cargo.lock" | ||
- "**/Cargo.toml" | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- "**/Cargo.lock" | ||
- "**/Cargo.toml" | ||
|
||
jobs: | ||
audit: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions-rs/audit-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
name: devel | ||
on: | ||
pull_request: | ||
paths: | ||
- .github/workflows/devel.yml | ||
- .cargo/config.toml | ||
- Cargo.lock | ||
- Cargo.toml | ||
- src/** | ||
push: | ||
branches: | ||
- master | ||
- staging | ||
- trying | ||
paths: | ||
- .github/workflows/devel.yml | ||
- Cargo.lock | ||
- Cargo.toml | ||
- src/** | ||
schedule: | ||
- cron: '15 01 * * *' # Every day at 01:15 UTC | ||
|
||
jobs: | ||
test: | ||
name: test | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
# Cargo binary | ||
CARGO_BIN: cargo | ||
# When CARGO_BIN is set to CROSS, this is set to `--target matrix.target` | ||
TARGET_FLAGS: "" | ||
# When CARGO_BIN is set to CROSS, TARGET_DIR includes matrix.target | ||
TARGET_DIR: ./target | ||
# Emit backtraces on panics | ||
RUST_BACKTRACE: 1 | ||
# Skip tests | ||
SKIP_TESTS: "" | ||
strategy: | ||
matrix: | ||
build: | ||
- pinned | ||
- linux-musl | ||
- linux-gnu | ||
- macos | ||
- windows-msvc | ||
include: | ||
# Specific Rust channels. | ||
# We test against the latest and minimum Rust stable version. | ||
- build: pinned | ||
os: ubuntu-22.04 | ||
rust: 1.70.0 | ||
# Some of our release builds are generated by a nightly compiler to take | ||
# advantage of the latest optimizations/compile time improvements. | ||
- build: linux-musl | ||
os: ubuntu-22.04 | ||
rust: stable | ||
target: x86_64-unknown-linux-musl | ||
- build: linux-gnu | ||
os: ubuntu-22.04 | ||
rust: stable | ||
target: x86_64-unknown-linux-gnu | ||
- build: macos | ||
os: macos-12 | ||
rust: stable | ||
target: x86_64-apple-darwin | ||
- build: windows-msvc | ||
os: windows-2022 | ||
rust: stable | ||
target: x86_64-pc-windows-msvc | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
target: ${{ matrix.target }} | ||
|
||
- name: Set up Cross | ||
if: ${{ !contains(matrix.os, 'windows') && matrix.target != '' }} | ||
shell: bash | ||
run: | | ||
target='' | ||
case "${{ matrix.os }}" in | ||
*macos*) | ||
target=x86_64-apple-darwin | ||
;; | ||
*) | ||
target=x86_64-unknown-linux-musl | ||
;; | ||
esac | ||
echo "Installing cross..." | ||
curl -sSL \ | ||
"https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-$target.tar.gz" \ | ||
| sudo tar zxf - -C /usr/local/bin/ cross cross-util | ||
cross -V | ||
echo "CARGO_BIN=/usr/local/bin/cross" >> $GITHUB_ENV | ||
- name: Setup Cargo | ||
shell: bash | ||
run: | | ||
if [[ "${{ matrix.target }}" != "" ]]; then | ||
echo "TARGET_FLAGS=--target=${{ matrix.target }}" >> $GITHUB_ENV | ||
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV | ||
fi | ||
echo "cargo command is: ${{ env.CARGO_BIN }}" | ||
echo "target flag is: ${{ env.TARGET_FLAGS }}" | ||
echo "target dir is: ${{ env.TARGET_DIR }}" | ||
- name: Run tests | ||
shell: bash | ||
run: | | ||
${{ env.CARGO_BIN }} test --verbose ${{ env.TARGET_FLAGS }} ${{ env.SKIP_TESTS }} | ||
- name: Run build | ||
shell: bash | ||
run: | | ||
${{ env.CARGO_BIN }} build --example server --verbose ${{ env.TARGET_FLAGS }} | ||
checks: | ||
name: checks | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
components: rustfmt, clippy | ||
|
||
- name: Check formatting | ||
run: | | ||
cargo fmt --all -- --check | ||
- name: Check via Clippy | ||
run: | | ||
cargo clippy --all-features -- -D warnings | ||
- name: Check crate docs | ||
run: | | ||
cargo doc --lib --no-deps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.