main.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. if: false # Disabled until we have a Rust client
  22. name: Format & Lint Client Rust
  23. runs-on: ubuntu-latest
  24. steps:
  25. - name: Git Checkout
  26. uses: actions/checkout@v4
  27. - name: Setup Environment
  28. uses: ./.github/actions/setup
  29. with:
  30. clippy: true
  31. rustfmt: true
  32. - name: Format Client Rust
  33. run: pnpm clients:rust:format
  34. - name: Lint Client Rust
  35. run: pnpm clients:rust:lint
  36. generate_clients:
  37. name: Check Client Generation
  38. runs-on: ubuntu-latest
  39. steps:
  40. - name: Git Checkout
  41. uses: actions/checkout@v4
  42. - name: Setup Environment
  43. uses: ./.github/actions/setup
  44. with:
  45. rustfmt: true
  46. - name: Generate Clients
  47. run: pnpm generate:clients
  48. - name: Check Working Directory
  49. run: |
  50. git status --porcelain
  51. test -z "$(git status --porcelain)"
  52. test_client_js:
  53. name: Test Client JS
  54. runs-on: ubuntu-latest
  55. needs: format_and_lint_client_js
  56. steps:
  57. - name: Git Checkout
  58. uses: actions/checkout@v4
  59. - name: Setup Environment
  60. uses: ./.github/actions/setup
  61. with:
  62. solana: true
  63. - name: Test Client JS
  64. run: pnpm clients:js:test
  65. test_client_rust:
  66. if: false # Disabled until we have a Rust client
  67. name: Test Client Rust
  68. runs-on: ubuntu-latest
  69. needs: format_and_lint_client_rust
  70. steps:
  71. - name: Git Checkout
  72. uses: actions/checkout@v4
  73. - name: Setup Environment
  74. uses: ./.github/actions/setup
  75. with:
  76. cargo-cache-key: cargo-rust-client
  77. solana: true
  78. - name: Test Client Rust
  79. run: pnpm clients:rust:test