test-cli-js.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 2019-2024 Tauri Programme within The Commons Conservancy
  2. # SPDX-License-Identifier: Apache-2.0
  3. # SPDX-License-Identifier: MIT
  4. name: test `@tauri-apps/cli`
  5. on:
  6. push:
  7. branches:
  8. - dev
  9. pull_request:
  10. paths:
  11. - '.github/workflows/test-cli-js.yml'
  12. # currently` @tauri-apps/cli` only tests the template
  13. - 'crates/tauri-cli/templates/app/**'
  14. env:
  15. RUST_BACKTRACE: 1
  16. CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
  17. concurrency:
  18. group: ${{ github.workflow }}-${{ github.ref }}
  19. cancel-in-progress: true
  20. jobs:
  21. test:
  22. runs-on: ${{ matrix.platform }}
  23. strategy:
  24. fail-fast: false
  25. matrix:
  26. platform: [ubuntu-latest, macos-latest, windows-latest]
  27. steps:
  28. - uses: actions/checkout@v4
  29. - name: install Rust stable
  30. uses: dtolnay/rust-toolchain@stable
  31. - run: corepack enable
  32. - name: setup node
  33. uses: actions/setup-node@v4
  34. with:
  35. node-version: 'lts/*'
  36. cache: 'pnpm'
  37. - name: install Linux dependencies
  38. if: matrix.platform == 'ubuntu-latest'
  39. run: |
  40. sudo apt-get update
  41. sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
  42. - uses: Swatinem/rust-cache@v2
  43. - name: test
  44. timeout-minutes: 30
  45. run: |
  46. cd ./packages/cli
  47. pnpm i --frozen-lockfile
  48. pnpm build
  49. pnpm test