ci(forgejo): add portable and windows quality workflows
这个提交存在于:
父节点
69b432b6ed
当前提交
d4af9794b0
共有 1 个文件被更改,包括 141 次插入 和 0 次删除
141
.forgejo/workflows/ci.yml
普通文件
141
.forgejo/workflows/ci.yml
普通文件
|
|
@ -0,0 +1,141 @@
|
||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
CI: "true"
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
portable-quality:
|
||||||
|
name: Portable quality checks
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 30
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 11.9.0
|
||||||
|
run_install: false
|
||||||
|
|
||||||
|
- name: Install Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: .node-version
|
||||||
|
cache: pnpm
|
||||||
|
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@1.97.1
|
||||||
|
with:
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Install Linux Tauri prerequisites
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if command -v sudo >/dev/null 2>&1; then
|
||||||
|
SUDO=sudo
|
||||||
|
else
|
||||||
|
SUDO=
|
||||||
|
fi
|
||||||
|
$SUDO apt-get update
|
||||||
|
$SUDO apt-get install -y \
|
||||||
|
libwebkit2gtk-4.1-dev \
|
||||||
|
libayatana-appindicator3-dev \
|
||||||
|
librsvg2-dev \
|
||||||
|
libxdo-dev \
|
||||||
|
libssl-dev \
|
||||||
|
patchelf
|
||||||
|
|
||||||
|
- name: Install JavaScript dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Run frontend checks
|
||||||
|
run: pnpm check:frontend
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium
|
||||||
|
run: pnpm exec playwright install chromium
|
||||||
|
|
||||||
|
- name: Run browser smoke tests
|
||||||
|
run: pnpm test:e2e
|
||||||
|
|
||||||
|
- name: Run workspace package tests
|
||||||
|
run: pnpm -r --if-present run test
|
||||||
|
|
||||||
|
- name: Check Rust formatting
|
||||||
|
run: pnpm rust:fmt
|
||||||
|
|
||||||
|
- name: Run Rust Clippy
|
||||||
|
run: pnpm rust:clippy
|
||||||
|
|
||||||
|
- name: Run Rust tests
|
||||||
|
run: pnpm rust:test
|
||||||
|
|
||||||
|
- name: Run Rust check
|
||||||
|
run: pnpm rust:check
|
||||||
|
|
||||||
|
windows-tauri:
|
||||||
|
name: Windows Tauri build
|
||||||
|
if: vars.ENABLE_WINDOWS_TAURI_CI == 'true'
|
||||||
|
runs-on: windows-latest
|
||||||
|
timeout-minutes: 45
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 11.9.0
|
||||||
|
run_install: false
|
||||||
|
|
||||||
|
- name: Install Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: .node-version
|
||||||
|
cache: pnpm
|
||||||
|
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@1.97.1
|
||||||
|
with:
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Install JavaScript dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Run frontend checks
|
||||||
|
run: pnpm check:frontend
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium
|
||||||
|
run: pnpm exec playwright install chromium
|
||||||
|
|
||||||
|
- name: Run browser smoke tests
|
||||||
|
run: pnpm test:e2e
|
||||||
|
|
||||||
|
- name: Run workspace package tests
|
||||||
|
run: pnpm -r --if-present run test
|
||||||
|
|
||||||
|
- name: Check Rust formatting
|
||||||
|
run: pnpm rust:fmt
|
||||||
|
|
||||||
|
- name: Run Rust Clippy
|
||||||
|
run: pnpm rust:clippy
|
||||||
|
|
||||||
|
- name: Run Rust tests
|
||||||
|
run: pnpm rust:test
|
||||||
|
|
||||||
|
- name: Run Rust check
|
||||||
|
run: pnpm rust:check
|
||||||
|
|
||||||
|
- name: Build Tauri application
|
||||||
|
run: pnpm tauri:build
|
||||||
正在加载…
添加表格
在新工单中引用