Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 0 additions & 134 deletions .github/workflows/build.yml

This file was deleted.

107 changes: 107 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# SPDX-FileCopyrightText: 2026 ChouChiu
# SPDX-License-Identifier: AGPL-3.0-only

name: CI

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1"

jobs:
quality:
name: Frontend and Rust quality
runs-on: ubuntu-latest
timeout-minutes: 45
container:
image: archlinux:latest

steps:
- name: Install build dependencies
run: >-
pacman -Syu --noconfirm --needed
base-devel
git
gtk4
gtk4-layer-shell
webkitgtk-6.0
openssl
rust
unzip

- name: Check out source
uses: actions/checkout@v7
with:
persist-credentials: false

- name: Trust checked-out workspace
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14

- name: Restore Bun cache
uses: actions/cache@v6
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('bun.lock') }}
restore-keys: |
bun-${{ runner.os }}-${{ runner.arch }}-

- name: Restore Cargo cache
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ runner.arch }}-arch-${{ hashFiles('rust-toolchain.toml', 'Cargo.lock') }}-${{ github.sha }}
restore-keys: |
cargo-${{ runner.os }}-${{ runner.arch }}-arch-${{ hashFiles('rust-toolchain.toml', 'Cargo.lock') }}-
cargo-${{ runner.os }}-${{ runner.arch }}-arch-

- name: Install frontend dependencies
run: bun install --frozen-lockfile

- name: Check frontend
run: |
bun run check
bun run typecheck
bun test

- name: Verify dependency licenses
run: |
cargo install --locked --features cli --version 0.9.1 cargo-about
cargo about generate --locked --all-features data/licenses/about.hbs \
--output-file data/licenses/dependencies.json
git diff --exit-code -- data/licenses/dependencies.json

- name: Check Rust formatting
run: cargo fmt --all -- --check

- name: Lint Rust
run: cargo clippy --locked --all-targets --all-features -- -D warnings

- name: Test workspace
run: cargo test --locked --all-targets --all-features

- name: Build documentation
run: cargo docs

- name: Build release binary
run: cargo build --locked --release
Loading