🔧 Global formatting and update formatting
This commit is contained in:
77
.github/workflows/code-quality.yml
vendored
Normal file
77
.github/workflows/code-quality.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
name: Code Quality Check
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
formatting:
|
||||
name: Code Formatting Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Check EditorConfig compliance
|
||||
uses: editorconfig-checker/action-editorconfig-checker@main
|
||||
|
||||
- name: Run EditorConfig checker with exclusions
|
||||
run: editorconfig-checker -exclude 'Cargo\.lock|dist/.*|.*\.(md|icns|ico|png|jpg|jpeg|gif|svg|desktop|wxs|plist|toml)$|cli\.js$|node_modules/.*|target/.*|src-tauri/(target|icons|png)/.*'
|
||||
|
||||
- name: Check Prettier formatting
|
||||
run: npx prettier --check . --ignore-unknown
|
||||
|
||||
rust-quality:
|
||||
name: Rust Code Quality
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
fail-fast: false
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: src-tauri
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
|
||||
- uses: rui314/setup-mold@v1
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
|
||||
- uses: taiki-e/install-action@v1
|
||||
with:
|
||||
tool: cargo-hack
|
||||
|
||||
- name: Install Ubuntu dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: awalsh128/cache-apt-pkgs-action@v1.4.3
|
||||
with:
|
||||
packages: libdbus-1-dev libsoup3.0-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra
|
||||
version: 1.0
|
||||
|
||||
- name: Check Rust formatting
|
||||
run: cargo fmt --all -- --color=always --check
|
||||
|
||||
- name: Run Clippy lints
|
||||
run: cargo hack --feature-powerset --exclude-features cli-build --no-dev-deps clippy
|
||||
2
.github/workflows/docker-publish.yml
vendored
2
.github/workflows/docker-publish.yml
vendored
@@ -1,7 +1,7 @@
|
||||
name: Build and Publish Docker Image
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Manual
|
||||
workflow_dispatch: # Manual
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
|
||||
23
.github/workflows/editorconfig-check.yml
vendored
23
.github/workflows/editorconfig-check.yml
vendored
@@ -1,23 +0,0 @@
|
||||
name: Check EditorConfig
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
editorconfig-check:
|
||||
name: Run EditorConfig Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: editorconfig-checker/action-editorconfig-checker@main
|
||||
- run: editorconfig-checker -config .ecrc.json
|
||||
40
.github/workflows/pake-cli.yaml
vendored
40
.github/workflows/pake-cli.yaml
vendored
@@ -3,55 +3,55 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Platform'
|
||||
description: "Platform"
|
||||
required: true
|
||||
default: 'macos-latest'
|
||||
default: "macos-latest"
|
||||
type: choice
|
||||
options:
|
||||
- 'windows-latest'
|
||||
- 'macos-latest'
|
||||
- 'ubuntu-24.04'
|
||||
- "windows-latest"
|
||||
- "macos-latest"
|
||||
- "ubuntu-24.04"
|
||||
url:
|
||||
description: 'URL'
|
||||
description: "URL"
|
||||
required: true
|
||||
name:
|
||||
description: 'Name, English, Linux no capital'
|
||||
description: "Name, English, Linux no capital"
|
||||
required: true
|
||||
icon:
|
||||
description: 'Icon, Image URL, Optional'
|
||||
description: "Icon, Image URL, Optional"
|
||||
required: false
|
||||
width:
|
||||
description: 'Width, Optional'
|
||||
description: "Width, Optional"
|
||||
required: false
|
||||
default: '1200'
|
||||
default: "1200"
|
||||
height:
|
||||
description: 'Height, Optional'
|
||||
description: "Height, Optional"
|
||||
required: false
|
||||
default: '780'
|
||||
default: "780"
|
||||
fullscreen:
|
||||
description: 'Fullscreen, At startup, Optional'
|
||||
description: "Fullscreen, At startup, Optional"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
hide_title_bar:
|
||||
description: 'Hide TitleBar, MacOS only, Optional'
|
||||
description: "Hide TitleBar, MacOS only, Optional"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
multi_arch:
|
||||
description: 'MultiArch, MacOS only, Optional'
|
||||
description: "MultiArch, MacOS only, Optional"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
targets:
|
||||
description: 'Targets, Linux only, Optional'
|
||||
description: "Targets, Linux only, Optional"
|
||||
required: false
|
||||
default: 'deb'
|
||||
default: "deb"
|
||||
type: choice
|
||||
options:
|
||||
- 'deb'
|
||||
- 'appimage'
|
||||
- 'rpm'
|
||||
- "deb"
|
||||
- "appimage"
|
||||
- "rpm"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
2
.github/workflows/pake_build_next.yaml
vendored
2
.github/workflows/pake_build_next.yaml
vendored
@@ -2,7 +2,7 @@ name: Build All Popular Apps
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'V*'
|
||||
- "V*"
|
||||
|
||||
jobs:
|
||||
read_apps_config:
|
||||
|
||||
36
.github/workflows/pake_build_single_app.yaml
vendored
36
.github/workflows/pake_build_single_app.yaml
vendored
@@ -3,43 +3,43 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
name:
|
||||
description: 'App Name'
|
||||
description: "App Name"
|
||||
required: true
|
||||
default: 'twitter'
|
||||
default: "twitter"
|
||||
title:
|
||||
description: 'App Title'
|
||||
description: "App Title"
|
||||
required: true
|
||||
default: 'Twitter'
|
||||
default: "Twitter"
|
||||
name_zh:
|
||||
description: 'App Name in Chinese'
|
||||
description: "App Name in Chinese"
|
||||
required: true
|
||||
default: '推特'
|
||||
default: "推特"
|
||||
url:
|
||||
description: 'App URL'
|
||||
description: "App URL"
|
||||
required: true
|
||||
default: 'https://twitter.com/'
|
||||
default: "https://twitter.com/"
|
||||
workflow_call:
|
||||
inputs:
|
||||
name:
|
||||
description: 'App Name'
|
||||
description: "App Name"
|
||||
type: string
|
||||
required: true
|
||||
default: 'twitter'
|
||||
default: "twitter"
|
||||
title:
|
||||
description: 'App Title'
|
||||
description: "App Title"
|
||||
required: true
|
||||
type: string
|
||||
default: 'Twitter'
|
||||
default: "Twitter"
|
||||
name_zh:
|
||||
description: 'App Name in Chinese'
|
||||
description: "App Name in Chinese"
|
||||
required: true
|
||||
type: string
|
||||
default: '推特'
|
||||
default: "推特"
|
||||
url:
|
||||
description: 'App URL'
|
||||
description: "App URL"
|
||||
required: true
|
||||
type: string
|
||||
default: 'https://twitter.com/'
|
||||
default: "https://twitter.com/"
|
||||
|
||||
jobs:
|
||||
build_single_app:
|
||||
@@ -144,7 +144,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
if: startsWith(github.ref, 'refs/tags/') != true
|
||||
with:
|
||||
path: 'output/*/*.*'
|
||||
path: "output/*/*.*"
|
||||
|
||||
- name: Upload For Release
|
||||
# arg info: https://github.com/ncipollo/release-action#release-action
|
||||
@@ -152,5 +152,5 @@ jobs:
|
||||
if: startsWith(github.ref, 'refs/tags/') == true
|
||||
with:
|
||||
allowUpdates: true
|
||||
artifacts: 'output/*/*.*'
|
||||
artifacts: "output/*/*.*"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
83
.github/workflows/rust-code-quality-check.yml
vendored
83
.github/workflows/rust-code-quality-check.yml
vendored
@@ -1,83 +0,0 @@
|
||||
name: Check Rust Code
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: src-tauri
|
||||
|
||||
jobs:
|
||||
cargo-test:
|
||||
name: Test codebase on ${{ matrix.os }} (cargo test)
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- windows-latest
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- uses: rui314/setup-mold@v1
|
||||
- uses: taiki-e/install-action@v1
|
||||
with:
|
||||
tool: cargo-hack,nextest
|
||||
- name: Install dependencies for Ubuntu
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: awalsh128/cache-apt-pkgs-action@v1.4.3
|
||||
with:
|
||||
packages: libdbus-1-dev libsoup3.0-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra
|
||||
version: 1.0
|
||||
- name: Run unit & integration tests with nextest
|
||||
run: cargo hack --feature-powerset --exclude-features cli-build nextest run --no-tests=pass
|
||||
|
||||
cargo-clippy:
|
||||
name: Check codebase quality (cargo clippy)
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- windows-latest
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
components: clippy
|
||||
- uses: taiki-e/install-action@cargo-hack
|
||||
- name: Install dependencies for Ubuntu
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: awalsh128/cache-apt-pkgs-action@v1.4.3
|
||||
with:
|
||||
packages: libdbus-1-dev libsoup3.0-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra
|
||||
version: 1.0
|
||||
- name: Run all-features code quality checks
|
||||
run: cargo hack --feature-powerset --exclude-features cli-build --no-dev-deps clippy
|
||||
- name: Run normal code quality check
|
||||
run: cargo clippy
|
||||
|
||||
cargo-fmt:
|
||||
name: Enforce codebase style (cargo fmt)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
components: rustfmt
|
||||
- run: cargo fmt --all -- --color=always --check
|
||||
Reference in New Issue
Block a user