You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.1 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. on:
  2. push:
  3. branches:
  4. - master
  5. pull_request:
  6. name: Tests
  7. jobs:
  8. tests:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Checkout sources
  12. uses: actions/checkout@v2
  13. - name: Install stable toolchain
  14. uses: actions-rs/toolchain@v1
  15. with:
  16. profile: minimal
  17. toolchain: stable
  18. override: true
  19. # Install for Anvil
  20. - name: Install Foundry
  21. uses: foundry-rs/foundry-toolchain@v1
  22. with:
  23. version: nightly
  24. - uses: Swatinem/rust-cache@v1
  25. with:
  26. cache-on-failure: true
  27. - name: cargo test
  28. run: |
  29. export PATH=$HOME/bin:$PATH
  30. cargo test
  31. lint:
  32. runs-on: ubuntu-latest
  33. steps:
  34. - name: Checkout sources
  35. uses: actions/checkout@v2
  36. - name: Install stable toolchain
  37. uses: actions-rs/toolchain@v1
  38. with:
  39. profile: minimal
  40. toolchain: stable
  41. override: true
  42. components: rustfmt, clippy
  43. - name: cargo fmt
  44. run: cargo fmt --all -- --check
  45. - name: cargo clippy
  46. run: cargo clippy -- -D warnings