Skip to content

Commit

Permalink
Merge pull request #29 from GopherJ/improve/add-mysql-service-in-ci
Browse files Browse the repository at this point in the history
add mysql sevice in CI
  • Loading branch information
GopherJ authored Apr 12, 2020
2 parents f1a255a + a6198c5 commit 1ef3511
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ addons:
- libssl-dev
services:
- postgresql
- mysql
cache: cargo
rust:
- stable
Expand All @@ -19,11 +20,15 @@ before_script:
- rustup component add clippy
- psql -c "CREATE DATABASE casbin;" -U postgres
- psql -c "CREATE USER casbin_rs WITH PASSWORD 'casbin_rs';" -U postgres
- mysql -u root -e "CREATE DATABASE casbin;"
- mysql -u root -e "CREATE USER 'casbin_rs'@'localhost' IDENTIFIED BY 'casbin_rs'; GRANT ALL ON casbin.* TO 'casbin_rs'@'localhost';"

script:
- cargo clean
- cargo build
- cargo test
- cargo build --no-default-features --features postgres,runtime-async-std
- cargo test --no-default-features --features postgres,runtime-async-std
- cargo build --no-default-features --features mysql,runtime-async-std
- cargo test --no-default-features --features mysql,runtime-async-std
- cargo clippy -- -D warnings
- cargo fmt --all -- --check

Expand Down

0 comments on commit 1ef3511

Please sign in to comment.