ci-lazer-rust.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: "Lazer Rust Test Suite"
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. paths:
  8. - .github/workflows/ci-lazer-rust.yml
  9. - lazer/**
  10. jobs:
  11. lazer-rust-test-suite:
  12. name: Lazer Rust Test Suite
  13. runs-on: ubuntu-22.04
  14. defaults:
  15. run:
  16. working-directory: lazer
  17. steps:
  18. - uses: actions/checkout@v4
  19. with:
  20. submodules: recursive
  21. - uses: actions-rust-lang/setup-rust-toolchain@v1
  22. - name: Install Protoc
  23. uses: arduino/setup-protoc@v3
  24. with:
  25. version: "30.2"
  26. repo-token: ${{ secrets.GITHUB_TOKEN }}
  27. - name: Install Foundry
  28. uses: foundry-rs/foundry-toolchain@v1
  29. - name: install taplo
  30. run: cargo install --locked taplo-cli@0.9.3
  31. - name: Install Solana Cli
  32. run: |
  33. sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
  34. echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH"
  35. - name: check Cargo.toml formatting
  36. run: find . -name Cargo.toml -exec taplo fmt --check --diff {} \;
  37. - name: Format check
  38. run: cargo fmt --all -- --check
  39. if: success() || failure()
  40. - name: Clippy check
  41. run: cargo clippy -p pyth-lazer-protocol -p pyth-lazer-client -p pyth-lazer-publisher-sdk --all-targets -- --deny warnings
  42. if: success() || failure()
  43. - name: Clippy check with mry
  44. run: cargo clippy -F mry -p pyth-lazer-protocol --all-targets -- --deny warnings
  45. if: success() || failure()
  46. - name: test
  47. run: cargo test -p pyth-lazer-protocol -p pyth-lazer-client -p pyth-lazer-publisher-sdk
  48. if: success() || failure()
  49. - name: test with mry
  50. run: cargo test -F mry -p pyth-lazer-protocol
  51. if: success() || failure()