-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.65 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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