test-cli-js.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Copyright 2019-2023 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. - next
  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@v2
  30. - name: install Rust stable
  31. uses: actions-rs/toolchain@v1
  32. with:
  33. toolchain: stable
  34. override: true
  35. - name: setup node
  36. uses: actions/setup-node@v2
  37. with:
  38. node-version: 14
  39. cache: yarn
  40. cache-dependency-path: tooling/cli/node/yarn.lock
  41. - name: install Linux dependencies
  42. if: matrix.platform == 'ubuntu-latest'
  43. run: |
  44. sudo apt-get update
  45. sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
  46. - uses: Swatinem/rust-cache@v2
  47. with:
  48. workspaces: |
  49. tooling/cli
  50. tooling/cli/node/test/jest/fixtures/empty/src-tauri
  51. - name: test
  52. timeout-minutes: 30
  53. run: |
  54. cd ./tooling/cli/node
  55. yarn
  56. yarn build
  57. yarn test