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
209 changes: 209 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
name: CI Checks

permissions:
contents: read

on:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
knip:
name: Check Knip
runs-on: ubuntu-latest
concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Cache Bun packages
uses: actions/cache@v4
with:
path: |
node_modules
~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('package.json') }}
restore-keys: |
bun-${{ runner.os }}-

- name: Install Bun Packages
run: bun install

- name: Run Knip
run: bun run knip

build:
name: Build Project
runs-on: ubuntu-latest
concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Cache apt packages
uses: actions/cache@v4
with:
path: /var/cache/apt
key: apt-${{ runner.os }}-${{ hashFiles('.github/workflows/check.yml') }}
restore-keys: |
apt-${{ runner.os }}-

- name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt #, clippy

- name: Cache Rust dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: rust-deps-${{ runner.os }}-${{ hashFiles('src-tauri/Cargo.lock') }}
restore-keys: |
rust-deps-${{ runner.os }}-

- name: Cache Rust build artifacts
uses: actions/cache@v4
with:
path: src-tauri/target
key: rust-build-${{ runner.os }}-${{ hashFiles('src-tauri/Cargo.lock', 'src-tauri/Cargo.toml', 'src-tauri/src/**/*.rs', 'src-tauri/build.rs') }}
restore-keys: |
rust-build-${{ runner.os }}-

- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Cache Bun packages
uses: actions/cache@v4
with:
path: |
node_modules
~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('package.json') }}
restore-keys: |
bun-${{ runner.os }}-

- name: Install Bun Packages
run: bun install

- name: Build project
run: bun run tauri build --no-bundle

# eslint:
# name: Check ESLint
# runs-on: ubuntu-latest
# concurrency:
# group: pr-${{ github.event.pull_request.number }}
# cancel-in-progress: true
# if: |
# !(
# github.event_name == 'push' &&
# startsWith(github.ref, 'refs/tags/')
# )
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v5
#
# - name: Install Bun
# uses: oven-sh/setup-bun@v2
# with:
# bun-version: latest
#
# - name: Cache Bun packages
# uses: actions/cache@v4
# with:
# path: |
# node_modules
# ~/.bun/install/cache
# key: bun-${{ runner.os }}-${{ hashFiles('package.json') }}
# restore-keys: |
# bun-${{ runner.os }}-
#
# - name: Install Bun Packages
# run: bun install
#
# - name: Run ESLint
# run: bun run lint

# prettier:
# name: Check Prettier
# runs-on: ubuntu-latest
# concurrency:
# group: pr-${{ github.event.pull_request.number }}
# cancel-in-progress: true
# if: |
# !(
# github.event_name == 'push' &&
# startsWith(github.ref, 'refs/tags/')
# )
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v5
#
# - name: Install Bun
# uses: oven-sh/setup-bun@v2
# with:
# bun-version: latest
#
# - name: Cache Bun packages
# uses: actions/cache@v4
# with:
# path: |
# node_modules
# ~/.bun/install/cache
# key: bun-${{ runner.os }}-${{ hashFiles('package.json') }}
# restore-keys: |
# bun-${{ runner.os }}-
#
# - name: Install Bun Packages
# run: bun install
#
# - name: Run Prettier
# run: bun run format:check

# rustfmt:
# name: Check Rustfmt
# runs-on: ubuntu-latest
# concurrency:
# group: pr-${{ github.event.pull_request.number }}
# cancel-in-progress: true
# if: |
# !(
# github.event_name == 'push' &&
# startsWith(github.ref, 'refs/tags/')
# )
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v5
#
# - name: Install Rust
# uses: dtolnay/rust-toolchain@stable
# with:
# components: rustfmt
#
# - name: Check formatting
# run: cargo fmt --all -- --check
57 changes: 0 additions & 57 deletions .github/workflows/pr.yml

This file was deleted.

Loading