casbin-rs / actix-casbin-auth

Casbin Actix-web access control middleware
https://github.com/casbin/casbin-rs
55 stars 15 forks source link

fix: CI support multiple rust toolchians #34

Closed greenhandatsjtu closed 2 years ago

greenhandatsjtu commented 2 years ago

For now, CI only use stable toolchain: https://github.com/casbin-rs/actix-casbin-auth/blob/05a4a269d60494fdeaf26562e8a4d5db9a695b7c/.github/workflows/ci.yml#L28 For example, in Auto Build CI (ubuntu-latest, nightly), stable toolchain is installed instead of nightly: https://github.com/casbin-rs/actix-casbin-auth/runs/5624601470?check_suite_focus=true#step:3:41 image

I fixed this issues by replacing toolchain: stable with toolchain: ${{ matrix.rust }}, now it works fine: https://github.com/greenhandatsjtu/actix-casbin-auth/runs/6284623554?check_suite_focus=true#step:3:49 image

casbin-bot commented 2 years ago

@smrpn @hackerchai @PsiACE @GopherJ please review

greenhandatsjtu commented 2 years ago

This is great, but it needs some tweaking. Things like fmt check and clippy don't need to be run on all toolchains, I think they just need to be passed on nightly.

Hi @PsiACE , I've add a commit, now fmt check and clippy are executed only on nightly, please review again, thank you!

codecov-commenter commented 2 years ago

Codecov Report

Merging #34 (9b4feb6) into master (05a4a26) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #34   +/-   ##
=======================================
  Coverage   79.86%   79.86%           
=======================================
  Files           4        4           
  Lines         149      149           
=======================================
  Hits          119      119           
  Misses         30       30           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 05a4a26...9b4feb6. Read the comment docs.

PsiACE commented 2 years ago

Hi @PsiACE , I've add a commit, now fmt check and clippy are executed only on nightly, please review again, thank you!

What do you think if we just run fmt check and clippy under linux(nightly)?

greenhandatsjtu commented 2 years ago

Hi @PsiACE , I've add a commit, now fmt check and clippy are executed only on nightly, please review again, thank you!

What do you think if we just run fmt check and clippy under linux(nightly)?

Thanks for your advice! Sorry that I didn't think carefully, I've add a commit for it.

hsluoyz commented 2 years ago

@PsiACE @hackerchai