Skip to content

Update ALL media files (using tauri icon). #20

Update ALL media files (using tauri icon).

Update ALL media files (using tauri icon). #20

Workflow file for this run

# .github/workflows/guardian.yml
#
# Sidecoin Monorepo CI Suite
# Runs on every push/PR to master across all packages.
#
# IMPORTANT: All cargo commands use --locked to ensure deterministic
# builds from the committed Cargo.lock. Without --locked, Cargo may
# resolve newer transitive dependencies (e.g. tauri-runtime) that
# introduce breaking trait changes and fail compilation.
name: Sidecoin CI Suite
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
guardian:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
env:
WEBVIEW2_LINK_STATIC: "1"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt, llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-v2
workspaces: "./packages/desktop/src-tauri -> target"
- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
xvfb
- name: Install Frontend dependencies
run: pnpm install --frozen-lockfile
# ── Shared ──────────────────────────────────────────────
- name: Type-check Shared
run: pnpm --filter @sidecoin/shared build
# ── Web ─────────────────────────────────────────────────
- name: Build Web
run: pnpm --filter @sidecoin/web build
# ── Wallet ──────────────────────────────────────────────
- name: Build Wallet
run: pnpm --filter @sidecoin/wallet build
- name: Test Wallet
run: pnpm --filter @sidecoin/wallet test
- name: Type-check Wallet
run: pnpm --filter @sidecoin/wallet type-check
# ── Desktop — Placeholder Dist ──────────────────────────
#
# Tauri's generate_context!() proc macro validates that
# frontendDist ("../dist") exists at compile time. This
# placeholder must exist BEFORE any cargo command that
# compiles the Tauri app (clippy, build, llvm-cov, etc.).
# It is replaced by the real frontend build later.
# ────────────────────────────────────────────────────────
- name: Create Placeholder Dist
shell: bash
run: mkdir -p packages/desktop/dist && touch packages/desktop/dist/index.html
# ── Desktop — Rust Quality Gates ────────────────────────
- name: Check Rust Formatting
working-directory: packages/desktop/src-tauri
run: cargo fmt --all -- --check
- name: Clippy Lint
working-directory: packages/desktop/src-tauri
run: cargo clippy --locked --all-features --lib -- -D warnings
# ── Desktop — Build ─────────────────────────────────────
- name: Generate Types (Specta)
shell: bash
working-directory: packages/desktop/src-tauri
run: |
cargo run --locked --bin export_types
node -e "
const fs = require('fs');
const path = require('path');
const f = path.join('..', 'src', 'bindings.ts');
if (fs.existsSync(f)) {
const content = fs.readFileSync(f, 'utf8');
if (!content.startsWith('//@ts-nocheck')) {
fs.writeFileSync(f, '//@ts-nocheck\n' + content);
}
}
"
- name: Build Desktop Frontend
run: pnpm --filter @sidecoin/desktop exec vite build
- name: Build Tauri App
working-directory: packages/desktop/src-tauri
run: cargo build --locked
# ── Desktop — Tests ─────────────────────────────────────
- name: Run Rust Unit Tests (with coverage)
if: matrix.platform != 'windows-latest'
working-directory: packages/desktop/src-tauri
shell: bash
run: cargo llvm-cov --locked --all-features --lib --lcov --output-path lcov-rust.info
- name: Run Desktop Frontend Tests
run: pnpm --filter @sidecoin/desktop test
- name: Run Desktop Type Check
run: pnpm --filter @sidecoin/desktop exec vue-tsc --noEmit --skipLibCheck
# ── Mobile — Tests ──────────────────────────────────────
- name: Run Mobile Tests
if: matrix.platform == 'ubuntu-latest'
run: pnpm --filter @sidecoin/mobile test
# ── Desktop — E2E ───────────────────────────────────────
- name: Run E2E Tests
continue-on-error: ${{ matrix.platform != 'ubuntu-latest' }}
env:
CI: true
shell: bash
run: |
if [ "${{ matrix.platform }}" == "ubuntu-latest" ]; then
xvfb-run --auto-servernum pnpm --filter @sidecoin/desktop test:e2e
else
pnpm --filter @sidecoin/desktop test:e2e
fi
# ── Coverage Upload ─────────────────────────────────────
- name: Verify coverage file exists
if: matrix.platform == 'ubuntu-latest'
working-directory: packages/desktop/src-tauri
shell: bash
run: |
if [ -f lcov-rust.info ]; then
echo "✅ Coverage file found ($(wc -l < lcov-rust.info) lines)"
head -5 lcov-rust.info
else
echo "❌ Coverage file NOT found"
ls -la
exit 1
fi
- name: Upload Rust Coverage
if: matrix.platform == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
files: packages/desktop/src-tauri/lcov-rust.info
flags: rust
fail_ci_if_error: false
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload Desktop Frontend Coverage
if: matrix.platform == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
files: packages/desktop/coverage/lcov.info
flags: desktop-frontend
fail_ci_if_error: false
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload Wallet Coverage
if: matrix.platform == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
files: packages/wallet/coverage/lcov.info
flags: wallet
fail_ci_if_error: false
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}