test-cli-rs.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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-cli`
  5. on:
  6. push:
  7. branches:
  8. - dev
  9. pull_request:
  10. paths:
  11. - '.github/workflows/test-cli-rs.yml'
  12. - 'crates/tauri-utils/**'
  13. - 'crates/tauri-bundler/**'
  14. - 'crates/tauri-cli/**'
  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.os }}
  24. strategy:
  25. fail-fast: false
  26. matrix:
  27. platform:
  28. - { target: x86_64-pc-windows-msvc, os: windows-latest }
  29. - {
  30. target: aarch64-pc-windows-msvc,
  31. os: windows-latest,
  32. args: --no-default-features --features native-tls-vendored
  33. }
  34. - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
  35. - { target: x86_64-apple-darwin, os: macos-latest }
  36. steps:
  37. - uses: actions/checkout@v4
  38. - name: 'Setup Rust'
  39. uses: dtolnay/rust-toolchain@stable
  40. with:
  41. targets: ${{ matrix.platform.target }}
  42. - name: install Linux dependencies
  43. if: matrix.platform.os == 'ubuntu-latest'
  44. run: |
  45. sudo apt-get update
  46. sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1 libayatana-appindicator3-dev
  47. - uses: Swatinem/rust-cache@v2
  48. - name: test CLI
  49. run: cargo test --manifest-path ./crates/tauri-cli/Cargo.toml ${{ matrix.platform.args }}