test-cli-js.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. - 1.x
  10. pull_request:
  11. paths:
  12. - '.github/workflows/test-cli-js.yml'
  13. # currently` @tauri-apps/cli` only tests the template
  14. - 'tooling/cli/templates/app/**'
  15. env:
  16. RUST_BACKTRACE: 1
  17. CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
  18. concurrency:
  19. group: ${{ github.workflow }}-${{ github.ref }}
  20. cancel-in-progress: true
  21. jobs:
  22. test:
  23. runs-on: ${{ matrix.platform }}
  24. strategy:
  25. fail-fast: false
  26. matrix:
  27. platform: [ubuntu-latest, macos-latest, windows-latest]
  28. steps:
  29. - uses: actions/checkout@v4
  30. - name: install Rust stable
  31. uses: dtolnay/rust-toolchain@stable
  32. - name: setup node
  33. uses: actions/setup-node@v2
  34. with:
  35. node-version: 18
  36. cache: yarn
  37. cache-dependency-path: tooling/cli/node/yarn.lock
  38. - name: install Linux dependencies
  39. if: matrix.platform == 'ubuntu-latest'
  40. run: |
  41. sudo apt-get update
  42. sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
  43. - uses: Swatinem/rust-cache@v2
  44. with:
  45. workspaces: |
  46. tooling/cli
  47. tooling/cli/node/test/jest/fixtures/empty/src-tauri
  48. - name: test
  49. timeout-minutes: 30
  50. run: |
  51. cd ./tooling/cli/node
  52. yarn
  53. yarn build
  54. yarn test