Skip to content

Commit

Permalink
chore: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Clover-You committed Nov 22, 2024
1 parent 8d69b2a commit f1f06c1
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
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

0 comments on commit f1f06c1

Please sign in to comment.