Skip to content

Commit b51671e

Browse files
authored
Merge pull request #31 from hackerchai/master
Update version 0.6.1
2 parents ac1d2fd + d79c2db commit b51671e

File tree

5 files changed

+147
-47
lines changed

5 files changed

+147
-47
lines changed

.github/workflows/ci.yml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
name: Auto Build CI
14+
runs-on: ubuntu-latest
15+
16+
services:
17+
postgres:
18+
image: postgres:11
19+
env:
20+
POSTGRES_USER: casbin_rs
21+
POSTGRES_PASSWORD: casbin_rs
22+
POSTGRES_DB: casbin
23+
ports:
24+
- 5432:5432
25+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
26+
27+
steps:
28+
- name: Checkout Repository
29+
uses: actions/checkout@master
30+
31+
- name: Shutdown Ubuntu MySQL (SUDO)
32+
run: sudo service mysql stop
33+
34+
- name: Set Up MySQL
35+
uses: mirromutth/[email protected]
36+
with:
37+
mysql version: '8.0'
38+
mysql database: 'casbin'
39+
mysql user: 'casbin_rs'
40+
mysql password: 'casbin_rs'
41+
42+
- name: Install Rust toolchain
43+
uses: actions-rs/toolchain@v1
44+
with:
45+
profile: minimal
46+
toolchain: stable
47+
components: rustfmt, clippy
48+
override: true
49+
50+
- name: Install Dependencies
51+
run: sudo apt-get install libssl-dev
52+
53+
- name: Cargo Build
54+
uses: actions-rs/cargo@v1
55+
with:
56+
command: build
57+
58+
- name: Cargo Test For PostgreSQL,async-std
59+
uses: actions-rs/cargo@v1
60+
with:
61+
command: test
62+
args: --no-default-features --features postgres,runtime-async-std
63+
64+
- name: Cargo Test For PostgreSQL,tokio
65+
uses: actions-rs/cargo@v1
66+
with:
67+
command: test
68+
args: --no-default-features --features postgres,runtime-tokio
69+
70+
- name: Cargo Test For MySQL,async-std
71+
uses: actions-rs/cargo@v1
72+
with:
73+
command: test
74+
args: --no-default-features --features mysql,runtime-async-std
75+
76+
- name: Cargo Test For MySQL,tokio
77+
uses: actions-rs/cargo@v1
78+
with:
79+
command: test
80+
args: --no-default-features --features mysql,runtime-tokio
81+
82+
- name: Cargo Clippy
83+
uses: actions-rs/cargo@v1
84+
with:
85+
command: clippy
86+
args: -- -D warnings
87+
88+
- name: Cargo Fmt Check
89+
uses: actions-rs/cargo@v1
90+
with:
91+
command: fmt
92+
args: --all -- --check

.github/workflows/coverage.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
cover:
13+
name: Auto Codecov Coverage
14+
runs-on: ubuntu-latest
15+
16+
services:
17+
postgres:
18+
image: postgres:11
19+
env:
20+
POSTGRES_USER: casbin_rs
21+
POSTGRES_PASSWORD: casbin_rs
22+
POSTGRES_DB: casbin
23+
ports:
24+
- 5432:5432
25+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
26+
27+
steps:
28+
- name: Checkout Repository
29+
uses: actions/checkout@master
30+
31+
- name: Install Rust toolchain
32+
uses: actions-rs/toolchain@v1
33+
with:
34+
profile: minimal
35+
toolchain: stable
36+
override: true
37+
38+
- name: Install PostgreSQL Dependencies
39+
run: sudo apt-get install libpq-dev postgresql-client
40+
41+
- name: Run cargo-tarpaulin
42+
uses: actions-rs/[email protected]
43+
with:
44+
args: --out Xml
45+
46+
- name: Upload to codecov.io
47+
uses: codecov/codecov-action@v1
48+
with:
49+
token: ${{secrets.CODECOV_TOKEN}}

.travis.yml

-41
This file was deleted.

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "diesel-adapter"
3-
version = "0.6.0"
3+
version = "0.6.1"
44
authors = ["Cheng JIANG <[email protected]>"]
55
edition = "2018"
66
license = "Apache-2.0"
@@ -9,7 +9,7 @@ homepage="https://github.com/casbin-rs/diesel-adapter"
99
readme="README.md"
1010

1111
[dependencies]
12-
casbin = { version = "0.6.0" }
12+
casbin = { version = "0.6.2", default-features = false }
1313
diesel = { version = "1.4.4", features = ["r2d2"] }
1414
async-trait = "0.1.30"
1515

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

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

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

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

1515
```
16-
casbin = { version = "0.4.3" }
17-
diesel-adapter = { version = "0.5.0", features = ["postgres"] }
16+
casbin = { version = "0.6.2", default-features = false }
17+
diesel-adapter = { version = "0.6.1", features = ["postgres"] }
1818
async-std = "1.5.0"
1919
```
2020

0 commit comments

Comments
 (0)