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.

67 lines
1.6 KiB

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. - 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. - uses: Swatinem/rust-cache@v1
  33. with:
  34. cache-on-failure: true
  35. - name: cargo test
  36. run: |
  37. export PATH=$HOME/bin:$PATH
  38. cargo test
  39. - name: cargo test circom 2 feature flag
  40. run: |
  41. export PATH=$HOME/bin:$PATH
  42. cargo test --features circom-2
  43. lint:
  44. runs-on: ubuntu-latest
  45. steps:
  46. - name: Checkout sources
  47. uses: actions/checkout@v2
  48. - name: Install stable toolchain
  49. uses: actions-rs/toolchain@v1
  50. with:
  51. profile: minimal
  52. toolchain: stable
  53. override: true
  54. components: rustfmt, clippy
  55. - name: cargo fmt
  56. run: cargo fmt --all -- --check
  57. - name: cargo clippy
  58. run: cargo clippy -- -D warnings