-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d69b2a
commit f1f06c1
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: 'ci' | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
Check: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
settings: | ||
- platform: windows-latest | ||
args: "--verbose" | ||
target: "windows" | ||
- platform: macos-latest | ||
args: "--target x86_64-apple-darwin" | ||
target: "macos-intel" | ||
- platform: macos-latest | ||
args: "--target aarch64-apple-darwin" | ||
target: "macos-arm" | ||
runs-on: ${{ matrix.settings.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Add Rust targets(macOS Intel) | ||
if: matrix.settings.target == 'macos-intel' | ||
run: rustup target add x86_64-apple-darwin | ||
|
||
- name: Add Rust targets(macOS ARM) | ||
if: matrix.settings.target == 'macos-arm' | ||
run: rustup target add aarch64-apple-darwin | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Set node version to LTS | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: lts/Hydrogen | ||
cache: 'pnpm' | ||
|
||
- run: pnpm install | ||
|
||
- name: Lint | ||
run: pnpm lint | ||
|
||
- name: Run Vitest | ||
run: pnpm run test -- --run | ||
|
||
- name: Rust setup | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Check the package for errors. | ||
run: cargo check --manifest-path ./src-tauri/Cargo.toml --all | ||
|
||
- name: Lint rust sources. | ||
run: cargo clippy --manifest-path ./src-tauri/Cargo.toml --all-targets --all-features --tests --benches -- -D warnings | ||
|
||
- name: Run test for rust | ||
run: cargo test --manifest-path ./src-tauri/Cargo.toml --all-features |