diff --git a/.github/workflows/check-on-push.yml b/.github/workflows/core-lint-fmt.yml similarity index 73% rename from .github/workflows/check-on-push.yml rename to .github/workflows/core-lint-fmt.yml index 85f3392c5..c074fc3c3 100644 --- a/.github/workflows/check-on-push.yml +++ b/.github/workflows/core-lint-fmt.yml @@ -1,10 +1,12 @@ -name: clippy, fmt and eslint check +name: clippy and fmt check on: - push: - branches-ignore: - - latest - - dev + pull_request: + paths: + - .github/workflows/core-lint-fmt.yml + - ./tauri/** + - ./tauri-utils/** + - ./tauri-api/** jobs: workspace_clippy_fmt_check: @@ -25,11 +27,6 @@ jobs: env: TAURI_DIST_DIR: ${{ runner.workspace }}/tauri/tauri/examples/communication/dist TAURI_DIR: ${{ runner.workspace }}/tauri/tauri/examples/communication/src-tauri - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --manifest-path ./cli/tauri-bundler/Cargo.toml --all-targets -- -D warnings - name: bundler - uses: actions-rs/toolchain@v1 with: profile: minimal @@ -62,15 +59,3 @@ jobs: env: TAURI_DIST_DIR: ${{ runner.workspace }}/tauri/tauri/examples/communication/dist TAURI_DIR: ${{ runner.workspace }}/tauri/tauri/examples/communication/src-tauri - - eslint-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - name: install deps via yarn - working-directory: ./cli/tauri.js - run: yarn - - name: run eslint - working-directory: ./cli/tauri.js - run: yarn lint diff --git a/.github/workflows/js-lint.yml b/.github/workflows/js-lint.yml new file mode 100644 index 000000000..2a8f5482b --- /dev/null +++ b/.github/workflows/js-lint.yml @@ -0,0 +1,20 @@ +name: eslint check + +on: + pull_request: + paths: + - .github/workflows/js-lint.yml + - ./cli/tauri.js/** + +jobs: + eslint-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - name: install deps via yarn + working-directory: ./cli/tauri.js + run: yarn + - name: run eslint + working-directory: ./cli/tauri.js + run: yarn lint diff --git a/.github/workflows/test-bundler.yml b/.github/workflows/test-bundler.yml new file mode 100644 index 000000000..84273a531 --- /dev/null +++ b/.github/workflows/test-bundler.yml @@ -0,0 +1,54 @@ +name: test bundler + +on: + pull_request: + paths: + - .github/workflows/test-bundler.yml + - ./cli/tauri-bundler/** +env: + RUST_BACKTRACE: 1 + +jobs: + build-tauri-bundler: + runs-on: ${{ matrix.platform }} + + strategy: + fail-fast: false + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - uses: actions/checkout@v2 + - name: install stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: test + run: | + cd ./cli/tauri-bundler + cargo test + + clippy-fmt-check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - run: rustup component add clippy + - name: clippy check + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --manifest-path ./cli/tauri-bundler/Cargo.toml --all-targets -- -D warnings + name: bundler + - name: install rustfmt + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + components: rustfmt + - name: fmt check + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --manifest-path ./cli/tauri-bundler/Cargo.toml --all -- --check diff --git a/.github/workflows/test-on-pr.yml b/.github/workflows/test-core.yml similarity index 78% rename from .github/workflows/test-on-pr.yml rename to .github/workflows/test-core.yml index 281f10ad0..969e6f8cb 100644 --- a/.github/workflows/test-on-pr.yml +++ b/.github/workflows/test-core.yml @@ -1,6 +1,14 @@ -name: test library +name: test core + +on: + pull_request: + paths: + - .github/workflows/test-core.yml + - ./cli/** + - ./tauri/** + - ./tauri-api/** + - ./tauri-utils/** -on: pull_request env: RUST_BACKTRACE: 1 @@ -38,25 +46,6 @@ jobs: TAURI_DIST_DIR: ${{ runner.workspace }}/tauri/tauri/examples/communication/dist TAURI_DIR: ${{ runner.workspace }}/tauri/tauri/examples/communication/src-tauri - build-tauri-bundler: - runs-on: ${{ matrix.platform }} - - strategy: - fail-fast: false - matrix: - platform: [ubuntu-latest, macos-latest, windows-latest] - - steps: - - uses: actions/checkout@v2 - - name: install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: build - run: | - cd ./cli/tauri-bundler - cargo build - test-tauri-js-cli: runs-on: ${{ matrix.platform }} diff --git a/cli/tauri-bundler/src/bundle/common.rs b/cli/tauri-bundler/src/bundle/common.rs index 37611f923..a4e835876 100644 --- a/cli/tauri-bundler/src/bundle/common.rs +++ b/cli/tauri-bundler/src/bundle/common.rs @@ -311,6 +311,7 @@ mod tests { assert!(tmp.path().join("parent/file.txt").is_file()); } + #[cfg(not(windows))] #[test] fn copy_dir_with_symlinks() { // Create a directory structure that looks like this: