mattrguerra/cortexmainPrivate on GitHub, published here in full

ci.yml

Language YAML2.4 KB86 lines

.github/workflows/ci.yml

  1. name: ci
  2. on:
  3. push:
  4. pull_request:
  5. env:
  6. CARGO_TERM_COLOR: always
  7. jobs:
  8. checks:
  9. runs-on: ubuntu-24.04
  10. steps:
  11. - uses: actions/checkout@v4
  12. - run: scripts/check-no-em-dash.sh
  13. - run: scripts/check-secrets.sh
  14. rust:
  15. runs-on: ubuntu-24.04
  16. steps:
  17. - uses: actions/checkout@v4
  18. - name: Linux libraries for the webview
  19. run: |
  20. sudo apt-get update
  21. sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev libssl-dev
  22. - uses: dtolnay/rust-toolchain@stable
  23. with:
  24. components: rustfmt, clippy
  25. - uses: Swatinem/rust-cache@v2
  26. - uses: actions/setup-node@v4
  27. with:
  28. node-version: 22
  29. cache: npm
  30. # tauri's build script needs the built frontend to embed.
  31. - run: npm ci && npx vite build
  32. - run: cargo fmt --all --check
  33. - run: cargo clippy --workspace --all-targets -- -D warnings
  34. - run: cargo test --workspace
  35. - name: The TypeScript types match the Rust ones
  36. run: git diff --exit-code -- src/ipc/gen
  37. frontend:
  38. runs-on: ubuntu-24.04
  39. steps:
  40. - uses: actions/checkout@v4
  41. - uses: actions/setup-node@v4
  42. with:
  43. node-version: 22
  44. cache: npm
  45. - run: npm ci
  46. - run: npm run format:check
  47. - run: npx tsc --noEmit
  48. - run: npx vitest run
  49. - run: npx playwright install --with-deps chromium
  50. - run: npx playwright test
  51. env:
  52. CI: '1'
  53. - uses: actions/upload-artifact@v4
  54. if: failure()
  55. with:
  56. name: playwright-traces
  57. path: test-results/
  58. e2e:
  59. needs: [rust, frontend]
  60. runs-on: ubuntu-24.04
  61. steps:
  62. - uses: actions/checkout@v4
  63. - run: |
  64. sudo apt-get update
  65. sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev libssl-dev webkit2gtk-driver xvfb dbus-x11
  66. - uses: dtolnay/rust-toolchain@stable
  67. - uses: Swatinem/rust-cache@v2
  68. - uses: actions/setup-node@v4
  69. with:
  70. node-version: 22
  71. cache: npm
  72. - run: cargo install tauri-driver --locked
  73. - run: npm ci
  74. - run: npx tauri build --debug --no-bundle --features e2e
  75. - run: E2E_SHOT=e2e-failure.png scripts/e2e-linux.sh
  76. - uses: actions/upload-artifact@v4
  77. if: failure()
  78. with:
  79. name: e2e-screenshot
  80. path: e2e-failure.png