mirror of
https://github.com/Xevion/byte-me.git
synced 2025-12-09 18:06:39 -06:00
66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [master]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: "pnpm"
|
|
|
|
- name: Install JS deps
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Install Linux dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
pkg-config \
|
|
build-essential \
|
|
libxdo-dev \
|
|
libssl-dev \
|
|
libglib2.0-dev \
|
|
libwebkit2gtk-4.1-dev \
|
|
libayatana-appindicator3-dev \
|
|
librsvg2-dev \
|
|
patchelf
|
|
|
|
# this will run again in next step, but we run it here to separate the error from the frontend build step
|
|
- name: Generate frontend bindings
|
|
run: pnpm run generate-types
|
|
|
|
- name: Build frontend (tsc + vite)
|
|
run: |
|
|
pnpm run build # implicitly runs generate-types
|
|
|
|
- name: Format check
|
|
run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features -- -D warnings
|
|
|
|
- name: Run tests
|
|
run: cargo test --manifest-path src-tauri/Cargo.toml --all-features
|