main.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. name: Main
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches: [main]
  7. jobs:
  8. format_and_lint_client_js:
  9. name: Format & Lint Client JS
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Git Checkout
  13. uses: actions/checkout@v4
  14. - name: Setup Environment
  15. uses: ./.github/actions/setup
  16. - name: Format Client JS
  17. run: pnpm clients:js:format
  18. - name: Lint Client JS
  19. run: pnpm clients:js:lint
  20. format_and_lint_client_rust:
  21. name: Format & Lint Client Rust
  22. runs-on: ubuntu-latest
  23. steps:
  24. - name: Git Checkout
  25. uses: actions/checkout@v4
  26. - name: Setup Environment
  27. uses: ./.github/actions/setup
  28. with:
  29. clippy: true
  30. rustfmt: true
  31. - name: Format Client Rust
  32. run: pnpm clients:rust:format
  33. - name: Lint Client Rust
  34. run: pnpm clients:rust:lint
  35. generate_clients:
  36. name: Check Client Generation
  37. runs-on: ubuntu-latest
  38. steps:
  39. - name: Git Checkout
  40. uses: actions/checkout@v4
  41. - name: Setup Environment
  42. uses: ./.github/actions/setup
  43. with:
  44. rustfmt: true
  45. - name: Generate Clients
  46. run: pnpm generate:clients
  47. - name: Check Working Directory
  48. run: |
  49. git status --porcelain
  50. test -z "$(git status --porcelain)"
  51. test_client_js:
  52. name: Test Client JS
  53. runs-on: ubuntu-latest
  54. needs: format_and_lint_client_js
  55. steps:
  56. - name: Git Checkout
  57. uses: actions/checkout@v4
  58. - name: Setup Environment
  59. uses: ./.github/actions/setup
  60. with:
  61. solana: true
  62. - name: Test Client JS
  63. run: pnpm clients:js:test
  64. test_client_rust:
  65. name: Test Client Rust
  66. runs-on: ubuntu-latest
  67. needs: format_and_lint_client_rust
  68. steps:
  69. - name: Git Checkout
  70. uses: actions/checkout@v4
  71. - name: Setup Environment
  72. uses: ./.github/actions/setup
  73. with:
  74. cargo-cache-key: cargo-rust-client
  75. solana: true
  76. - name: Test Client Rust
  77. run: pnpm clients:rust:test