Skip to content

Commit

Permalink
Merge pull request #31 from hackerchai/master
Browse files Browse the repository at this point in the history
Update version 0.6.1
  • Loading branch information
0x8f701 authored May 4, 2020
2 parents ac1d2fd + d79c2db commit b51671e
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 47 deletions.
92 changes: 92 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Auto Build CI
runs-on: ubuntu-latest

services:
postgres:
image: postgres:11
env:
POSTGRES_USER: casbin_rs
POSTGRES_PASSWORD: casbin_rs
POSTGRES_DB: casbin
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Checkout Repository
uses: actions/checkout@master

- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop

- name: Set Up MySQL
uses: mirromutth/[email protected]
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:
profile: minimal
toolchain: stable
components: rustfmt, clippy
override: true

- name: Install Dependencies
run: sudo apt-get install libssl-dev

- name: Cargo Build
uses: actions-rs/cargo@v1
with:
command: build

- name: Cargo Test For PostgreSQL,async-std
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features postgres,runtime-async-std

- name: Cargo Test For PostgreSQL,tokio
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features postgres,runtime-tokio

- name: Cargo Test For MySQL,async-std
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features mysql,runtime-async-std

- name: Cargo Test For MySQL,tokio
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features mysql,runtime-tokio

- name: Cargo Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

- name: Cargo Fmt Check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
49 changes: 49 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Coverage

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
cover:
name: Auto Codecov Coverage
runs-on: ubuntu-latest

services:
postgres:
image: postgres:11
env:
POSTGRES_USER: casbin_rs
POSTGRES_PASSWORD: casbin_rs
POSTGRES_DB: casbin
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Checkout Repository
uses: actions/checkout@master

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Install PostgreSQL Dependencies
run: sudo apt-get install libpq-dev postgresql-client

- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
args: --out Xml

- name: Upload to codecov.io
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "diesel-adapter"
version = "0.6.0"
version = "0.6.1"
authors = ["Cheng JIANG <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -9,7 +9,7 @@ homepage="https://github.com/casbin-rs/diesel-adapter"
readme="README.md"

[dependencies]
casbin = { version = "0.6.0" }
casbin = { version = "0.6.2", default-features = false }
diesel = { version = "1.4.4", features = ["r2d2"] }
async-trait = "0.1.30"

Expand All @@ -24,5 +24,5 @@ runtime-async-std = ["casbin/runtime-async-std"]

[dev-dependencies]
async-std = { version = "1.5.0", features = [ "attributes" ] }
tokio = { version = "0.2.11", features = [ "full" ] }
tokio = { version = "0.2.20", features = [ "full" ] }

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Crates.io](https://img.shields.io/crates/v/diesel-adapter.svg)](https://crates.io/crates/diesel-adapter)
[![Docs](https://docs.rs/diesel-adapter/badge.svg)](https://docs.rs/diesel-adapter)
[![Build Status](https://travis-ci.org/casbin-rs/diesel-adapter.svg?branch=master)](https://travis-ci.org/casbin-rs/diesel-adapter)
[![CI](https://github.com/casbin-rs/diesel-adapter/workflows/CI/badge.svg)](https://github.com/casbin-rs/diesel-adapter/actions)
[![codecov](https://codecov.io/gh/casbin-rs/diesel-adapter/branch/master/graph/badge.svg)](https://codecov.io/gh/casbin-rs/diesel-adapter)

An adapter designed to work with [casbin-rs](https://github.com/casbin/casbin-rs).
Expand All @@ -13,8 +13,8 @@ An adapter designed to work with [casbin-rs](https://github.com/casbin/casbin-rs
Add it to `Cargo.toml`

```
casbin = { version = "0.4.3" }
diesel-adapter = { version = "0.5.0", features = ["postgres"] }
casbin = { version = "0.6.2", default-features = false }
diesel-adapter = { version = "0.6.1", features = ["postgres"] }
async-std = "1.5.0"
```

Expand Down

0 comments on commit b51671e

Please sign in to comment.