chore(project): initialize cargo workspace, CI workflows, and package config

This commit is contained in:
Stevan Freeborn
2026-07-23 11:57:40 -05:00
parent 18c99e9f88
commit a6481370fa
9 changed files with 8156 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
name: CI
on:
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: lts/*
- name: Cache Cargo dependencies
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cache npm dependencies
uses: actions/cache@v6
with:
path: app/node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('app/package-lock.json') }}
- name: Install frontend dependencies
run: npm ci
working-directory: app
- name: Run Rust tests
run: cargo test --workspace
- name: Run Clippy
run: cargo clippy --workspace -- -D warnings
- name: Run Rust fmt check
run: cargo fmt --all -- --check
- name: Run frontend tests
run: npm test
working-directory: app
- name: Run ESLint
run: npm run lint
working-directory: app
- name: Run Prettier check
run: npm run format:check
working-directory: app
+54
View File
@@ -0,0 +1,54 @@
name: Release
on:
push:
tags: ['v*']
jobs:
build-server:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo dependencies
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
- name: Build server binary
run: cargo build --release -p clean-copy-server
- name: Create release artifact archive
run: |
tar -czf clean-copy-server-linux-x86_64.tar.gz -C target/release clean-copy-server
- name: Upload release artifacts
uses: actions/upload-artifact@v3
with:
name: server-release
path: clean-copy-server-linux-x86_64.tar.gz
build-tauri:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
- name: Install frontend dependencies
run: npm ci
working-directory: app
- name: Build Tauri app
run: npx tauri build
working-directory: app
- name: Upload release artifacts
uses: actions/upload-artifact@v4
with:
name: tauri-release
path: |
app/src-tauri/target/release/clean-copy.exe
app/src-tauri/target/release/bundle/msi/*.msi