From 5f94c1ce29e291d3d90380a144bfac08d5acbb4f Mon Sep 17 00:00:00 2001 From: Hackerchai Date: Sun, 27 Sep 2020 22:27:31 +0800 Subject: [PATCH 1/2] Fix: fix random mysql ci error --- .github/workflows/ci.yml | 22 +++++++++++----------- Cargo.toml | 12 ++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 205c7ad..28034cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,21 +24,21 @@ jobs: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + mysql: + image: mysql:8.0 + env: + MYSQL_DATABASE: casbin + MYSQL_USER: casbin_rs + MYSQL_PASSWORD: casbin_rs + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: - name: Checkout Repository uses: actions/checkout@master - - name: Shutdown Ubuntu MySQL (SUDO) - run: sudo service mysql stop - - - name: Set Up MySQL - uses: mirromutth/mysql-action@v1.1 - with: - mysql version: '8.0' - mysql database: 'casbin' - mysql user: 'casbin_rs' - mysql password: 'casbin_rs' - - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: diff --git a/Cargo.toml b/Cargo.toml index 11e3e73..c55f086 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,12 +9,12 @@ homepage= "https://github.com/casbin-rs/diesel-adapter" readme= "README.md" [dependencies] -casbin = { version = "2.0.1", default-features = false } +casbin = { version = "2.0.2", default-features = false } diesel = { version = "1.4.5", default-features = false, features = ["r2d2"] } -async-trait = "0.1.36" +async-trait = "0.1.40" futures = "0.3.5" -tokio = { version = "0.2.21", default-features = false, optional = true } -async-std = { version = "1.6.2", default-features = false, optional = true } +tokio = { version = "0.2.22", default-features = false, optional = true } +async-std = { version = "1.6.4", default-features = false, optional = true } [features] default = ["postgres", "runtime-async-std"] @@ -27,6 +27,6 @@ runtime-tokio = ["casbin/runtime-tokio", "tokio/blocking", "tokio/rt-core"] runtime-async-std = ["casbin/runtime-async-std", "async-std/unstable"] [dev-dependencies] -async-std = { version = "1.6.2", features = [ "attributes", "unstable"] } -tokio = { version = "0.2.21", features = [ "full" ] } +async-std = { version = "1.6.4", features = [ "attributes", "unstable"] } +tokio = { version = "0.2.22", features = [ "full" ] } From 8a7448a1364c4d30844f347bad45dc6f21737089 Mon Sep 17 00:00:00 2001 From: Hackerchai Date: Sun, 27 Sep 2020 22:35:30 +0800 Subject: [PATCH 2/2] Feat: bump version 0.8.1 --- Cargo.toml | 2 +- README.md | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c55f086..8a6bcd8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "diesel-adapter" -version = "0.8.0" +version = "0.8.1" authors = ["Cheng JIANG "] edition = "2018" license = "Apache-2.0" diff --git a/README.md b/README.md index ada4197..b99ffde 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ Based on [Diesel](https://github.com/diesel-rs/diesel), The current supported da Add it to `Cargo.toml` ``` -diesel-adapter = { version = "0.8.0", features = ["postgres"] } -async-std = "1.6.3" +diesel-adapter = { version = "0.8.1", features = ["postgres"] } +async-std = "1.6.4" ``` ## Example @@ -41,5 +41,6 @@ async fn main() -> Result<()> { - `postgres` - `mysql` +- `sqlite` -*Attention*: `postgres` and `mysql` are mutual exclusive which means that you can only activate one of them. Currently we don't have support for `sqlite`, it may be added in the near future. +*Attention*: `postgres`, `mysql`, `sqlite` are mutual exclusive which means that you can only activate one of them.