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.

54 lines
1.3 KiB

3 years ago
  1. on: [pull_request, push]
  2. name: Tests
  3. jobs:
  4. tests:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - name: Checkout sources
  8. uses: actions/checkout@v2
  9. - name: Install stable toolchain
  10. uses: actions-rs/toolchain@v1
  11. with:
  12. profile: minimal
  13. toolchain: stable
  14. override: true
  15. - name: Install node
  16. uses: actions/setup-node@v1
  17. with:
  18. node-version: 10
  19. - name: Install ganache
  20. run: npm install -g ganache-cli
  21. - name: Install Solc
  22. run: |
  23. mkdir -p "$HOME/bin"
  24. wget -q https://github.com/ethereum/solidity/releases/download/v0.7.6/solc-static-linux -O $HOME/bin/solc
  25. chmod u+x "$HOME/bin/solc"
  26. export PATH=$HOME/bin:$PATH
  27. solc --version
  28. - name: cargo test
  29. run: |
  30. export PATH=$HOME/bin:$PATH
  31. cargo test
  32. lint:
  33. runs-on: ubuntu-latest
  34. steps:
  35. - name: Checkout sources
  36. uses: actions/checkout@v2
  37. - name: Install stable toolchain
  38. uses: actions-rs/toolchain@v1
  39. with:
  40. profile: minimal
  41. toolchain: stable
  42. override: true
  43. components: rustfmt, clippy
  44. - name: cargo fmt
  45. run: cargo fmt --all -- --check
  46. - name: cargo clippy
  47. run: cargo clippy -- -D warnings