2023-02-19 16:17:49 +03:00
|
|
|
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
2022-02-14 00:21:15 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2023-05-22 18:52:44 +03:00
|
|
|
name: test `@tauri-apps/cli`
|
2022-02-14 00:21:15 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
- next
|
|
|
|
pull_request:
|
|
|
|
paths:
|
2022-06-27 18:46:49 +03:00
|
|
|
- '.github/workflows/test-cli-js.yml'
|
2023-05-22 18:52:44 +03:00
|
|
|
# currently` @tauri-apps/cli` only tests the template
|
2022-06-29 20:03:42 +03:00
|
|
|
- 'tooling/cli/templates/app/**'
|
2022-02-14 00:21:15 +03:00
|
|
|
|
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
2022-02-14 02:27:21 +03:00
|
|
|
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
|
2022-02-14 00:21:15 +03:00
|
|
|
|
2022-04-21 21:09:57 +03:00
|
|
|
concurrency:
|
2022-04-27 01:04:10 +03:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
2022-04-21 21:09:57 +03:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-02-14 00:21:15 +03:00
|
|
|
jobs:
|
2023-05-22 18:52:44 +03:00
|
|
|
test:
|
2022-02-14 00:21:15 +03:00
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-11-05 00:26:30 +03:00
|
|
|
|
2022-02-14 00:21:15 +03:00
|
|
|
- name: install Rust stable
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- name: setup node
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 14
|
|
|
|
cache: yarn
|
|
|
|
cache-dependency-path: tooling/cli/node/yarn.lock
|
2022-06-07 17:48:29 +03:00
|
|
|
|
|
|
|
- name: install Linux dependencies
|
2022-02-14 00:21:15 +03:00
|
|
|
if: matrix.platform == 'ubuntu-latest'
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2022-11-10 23:30:10 +03:00
|
|
|
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
|
2022-02-14 00:21:15 +03:00
|
|
|
|
2022-11-05 00:26:30 +03:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2022-02-14 00:21:15 +03:00
|
|
|
with:
|
2022-11-05 00:26:30 +03:00
|
|
|
workspaces: |
|
|
|
|
tooling/cli
|
|
|
|
tooling/cli/node/test/jest/fixtures/empty/src-tauri
|
2022-02-14 00:21:15 +03:00
|
|
|
|
|
|
|
- name: test
|
|
|
|
timeout-minutes: 30
|
|
|
|
run: |
|
|
|
|
cd ./tooling/cli/node
|
|
|
|
yarn
|
|
|
|
yarn build
|
|
|
|
yarn test
|