-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b8adaf
commit 46adb27
Showing
10 changed files
with
622 additions
and
4 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,12 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,89 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: {} | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
REDIS_URL: redis://localhost:6379/1 | ||
MONGODB_URL: mongodb://localhost:27017 | ||
POSTGRES_URL: postgres://postgres:postgres@localhost:5432 | ||
MYSQL_URL: mysql://root@127.0.0.1:3306/public | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: | | ||
rustup toolchain install nightly --profile minimal --component rustfmt --component clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: clippy | ||
run: | | ||
cargo clippy --workspace --all-targets --all-features -- -D warnings | ||
- name: rustfmt | ||
run: | | ||
cargo fmt --all --check | ||
check-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: | | ||
rustup toolchain install stable --profile minimal | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: cargo doc | ||
env: | ||
RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links" | ||
run: | | ||
cargo doc --all-features --no-deps | ||
test-integration: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- store: redis_store | ||
docker: true | ||
|
||
- store: mongodb_store | ||
docker: true | ||
|
||
- store: postgres_store | ||
features: postgres | ||
docker: true | ||
|
||
- store: mysql_store | ||
features: mysql | ||
docker: true | ||
|
||
- store: sqlite_store | ||
features: sqlite | ||
docker: false | ||
|
||
- store: moka_store | ||
docker: false | ||
|
||
- store: caching_store | ||
features: moka-store,sqlite | ||
docker: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: | | ||
rustup toolchain install ${{ env.MSRV }} --profile minimal | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: taiki-e/install-action@nextest | ||
- name: Start session store | ||
if: matrix.docker | ||
run: | | ||
docker compose -f tests/docker-compose.yml up ${{ matrix.store }} -d | ||
- name: Run integration tests | ||
run: | | ||
cargo nextest run ${{ matrix.store }}_test --test integration-tests --features ${{ matrix.features }} |
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,3 @@ | ||
[workspace] | ||
members = ["tests"] | ||
resolver = "2" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[package] | ||
name = "tests" | ||
version = "0.1.0" | ||
edition = "2021" | ||
publish = false | ||
|
||
[dev-dependencies] | ||
axum = "0.7" | ||
http = "1.0" | ||
http-body-util = "0.1" | ||
hyper = "1.0" | ||
time = "0.3.30" | ||
tokio = { version = "1", features = ["full"] } | ||
tower = "0.4.13" | ||
tower-cookies = "0.10.0" | ||
tower-sessions = "0.9" | ||
tower-sessions-sqlx-store = { path = "../sqlx-store/", features = [ | ||
"sqlite", | ||
"mysql", | ||
"postgres", | ||
] } | ||
tower-sessions-redis-store = { path = "../redis-store/" } | ||
tower-sessions-mongodb-store = { path = "../mongodb-store/" } | ||
tower-sessions-moka-store = { path = "../moka-store/" } | ||
|
||
[[test]] | ||
name = "test_integration" | ||
path = "test-integration.rs" |
Oops, something went wrong.