Skip to content

Commit

Permalink
update test CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Oct 20, 2023
1 parent 3559fcb commit 9d07e68
Showing 1 changed file with 12 additions and 28 deletions.
40 changes: 12 additions & 28 deletions .github/workflows/test-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,31 +130,31 @@ jobs:
- {
target: x86_64-pc-windows-msvc,
os: windows-latest,
cross: false,
runner: 'cargo',
command: "test",
}
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-latest,
cross: false,
runner: 'cargo',
command: "test",
}
- {
target: x86_64-apple-darwin,
os: macos-latest,
cross: false,
runner: 'cargo',
command: "test",
}
- {
target: aarch64-apple-ios,
os: macos-latest,
cross: false,
runner: 'cargo',
command: "build",
}
- {
target: aarch64-linux-android,
os: ubuntu-latest,
cross: true,
runner: 'cross',
command: "build",
}

Expand Down Expand Up @@ -192,34 +192,18 @@ jobs:
run: |
cargo update -p [email protected] --precise 0.3.23
- name: install cross
if: ${{ matrix.platform.runner == 'cross' }}
run: cargo install cross --git https://github.com/cross-rs/cross

- name: test ${{ matrix.package }}
if: matrix.package != 'tauri-plugin-sql'
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.platform.cross }}
command: ${{ matrix.platform.command }}
args: --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets

- name: test ${{ matrix.package }} --all-features
if: ${{ !contains(fromJSON('["tauri-plugin-http", "tauri-plugin-upload", "tauri-plugin-updater", "tauri-plugin-websocket", "tauri-plugin-sql"]'), matrix.package) }}
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.platform.cross }}
command: ${{ matrix.platform.command }}
args: --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --all-features
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets

- name: test ${{ matrix.package }} mysql
if: matrix.package == 'tauri-plugin-sql'
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.platform.cross }}
command: ${{ matrix.platform.command }}
args: --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features mysql
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features mysql

- name: test ${{ matrix.package }} postgres
if: matrix.package == 'tauri-plugin-sql'
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.platform.cross }}
command: ${{ matrix.platform.command }}
args: --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features postgres
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features postgres

0 comments on commit 9d07e68

Please sign in to comment.