This commit is contained in:
GW_MC
2026-05-25 03:43:34 +00:00
commit e5cac44ce5
59 changed files with 14461 additions and 0 deletions

61
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: Lint
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
lint-crates:
runs-on: ubuntu-latest
container:
image: gitea.gwmc.dev/otter/otter-ci:latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Rust, checkout and restore caches
uses: ./.github/actions/setup-rust
with:
components: clippy, rustfmt
- name: Run clippy
run: cargo clippy --all-features
- name: Check code formatting
run: |
cd src-tauri
cargo fmt -- --check
lint-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: |
pnpm install
- name: Run frontend linter
run: |
pnpm lint

30
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
test-crates:
runs-on: ubuntu-latest
container:
image: gitea.gwmc.dev/otter/otter-ci:latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Rust, checkout and restore caches
uses: ./.github/actions/setup-rust
- name: Run tests
run: |
cd src-tauri
cargo test --all-features