From 6fa376c8536ec3bc3a9d12a4089a161471bdbcdb Mon Sep 17 00:00:00 2001 From: HermesYP Date: Sat, 12 Sep 2026 11:14:50 +0530 Subject: [PATCH] ci: remove duplicate Code Quality workflow --- .github/workflows/ci.yml | 163 --------------------------------------- 1 file changed, 163 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index e55f0372f..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,163 +0,0 @@ -name: Code Quality - -on: - pull_request: - push: - branches: - - main - -permissions: - contents: read - -concurrency: - group: code-quality-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - quality: - name: Frontend - runs-on: ubuntu-24.04 - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Setup Vite+ - uses: voidzero-dev/setup-vp@v1 - with: - node-version: 24 - cache: true - run-install: | - args: - - --frozen-lockfile - - - name: Check changed files - env: - BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }} - shell: bash - run: | - set -euo pipefail - - if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then - BASE_SHA="${GITHUB_SHA}^1" - elif [[ -z "${BASE_SHA:-}" || "$BASE_SHA" == "0000000000000000000000000000000000000000" ]]; then - BASE_SHA="$(git rev-list --max-parents=0 "$GITHUB_SHA")" - fi - - mapfile -d '' changed_files < <( - git diff --name-only --diff-filter=ACMR -z "$BASE_SHA" "$GITHUB_SHA" - ) - - format_files=() - code_files=() - for file in "${changed_files[@]}"; do - case "$file" in - *.cjs | *.css | *.html | *.js | *.json | *.jsonc | *.jsx | *.md | *.mdx | *.mjs | *.scss | *.toml | *.ts | *.tsx | *.yaml | *.yml) - format_files+=("$file") - ;; - esac - case "$file" in - *.cjs | *.js | *.jsx | *.mjs | *.ts | *.tsx) - code_files+=("$file") - ;; - esac - done - - if (( ${#format_files[@]} )); then - vp fmt --check "${format_files[@]}" - else - echo "No changed files require formatting checks." - fi - - if (( ${#code_files[@]} )); then - check_log="$(mktemp)" - if ! vp check --no-fmt "${code_files[@]}" >"$check_log" 2>&1; then - cat "$check_log" - exit 1 - fi - else - echo "No changed JavaScript or TypeScript files require lint checks." - fi - - - name: Typecheck - run: vp run typecheck - - - name: Test - run: vp run test - - native: - name: Native - runs-on: ubuntu-24.04 - timeout-minutes: 15 - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Detect native changes - id: native-changes - env: - BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }} - shell: bash - run: | - set -euo pipefail - - if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then - BASE_SHA="${GITHUB_SHA}^1" - elif [[ -z "${BASE_SHA:-}" || "$BASE_SHA" == "0000000000000000000000000000000000000000" ]]; then - BASE_SHA="$(git rev-list --max-parents=0 "$GITHUB_SHA")" - fi - - if git diff --quiet "$BASE_SHA" "$GITHUB_SHA" -- \ - src-tauri \ - harbor-core \ - .github/workflows/ci.yml; then - echo "changed=false" >> "$GITHUB_OUTPUT" - else - echo "changed=true" >> "$GITHUB_OUTPUT" - fi - - - name: Skip native check - if: steps.native-changes.outputs.changed != 'true' - run: echo "No native build inputs changed; skipping cargo check." - - - name: Install Linux build dependencies - if: steps.native-changes.outputs.changed == 'true' - run: | - sudo apt-get update - sudo apt-get install -y \ - libasound2-dev \ - libayatana-appindicator3-dev \ - libgtk-3-dev \ - libmpv-dev \ - librsvg2-dev \ - libssl-dev \ - libwebkit2gtk-4.1-dev \ - pkg-config - - - name: Setup Rust - if: steps.native-changes.outputs.changed == 'true' - uses: dtolnay/rust-toolchain@stable - - - name: Cache Rust build - if: steps.native-changes.outputs.changed == 'true' - uses: Swatinem/rust-cache@v2 - with: - workspaces: | - harbor-core - src-tauri - - - name: Check Tauri application - if: steps.native-changes.outputs.changed == 'true' - env: - TAURI_CONFIG: '{"bundle":{"externalBin":[]}}' - run: cargo check --manifest-path src-tauri/Cargo.toml - - - name: Test Tauri application - if: steps.native-changes.outputs.changed == 'true' - env: - TAURI_CONFIG: '{"bundle":{"externalBin":[]}}' - run: cargo test --manifest-path src-tauri/Cargo.toml