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.

58 lines
1.4 KiB

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. - name: Install node
  20. uses: actions/setup-node@v1
  21. with:
  22. node-version: 10
  23. - name: Install ganache
  24. run: npm install -g ganache-cli
  25. - name: Install Solc
  26. run: |
  27. mkdir -p "$HOME/bin"
  28. wget -q https://github.com/ethereum/solidity/releases/download/v0.7.6/solc-static-linux -O $HOME/bin/solc
  29. chmod u+x "$HOME/bin/solc"
  30. export PATH=$HOME/bin:$PATH
  31. solc --version
  32. - name: cargo test
  33. run: |
  34. export PATH=$HOME/bin:$PATH
  35. cargo test
  36. lint:
  37. runs-on: ubuntu-latest
  38. steps:
  39. - name: Checkout sources
  40. uses: actions/checkout@v2
  41. - name: Install stable toolchain
  42. uses: actions-rs/toolchain@v1
  43. with:
  44. profile: minimal
  45. toolchain: stable
  46. override: true
  47. components: rustfmt, clippy
  48. - name: cargo fmt
  49. run: cargo fmt --all -- --check
  50. - name: cargo clippy
  51. run: cargo clippy -- -D warnings