chore: ci #1
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
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 |