From b4ed0c8b1b35f4fabb8f0e9cff6d2e337d84fbd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=90=93=F0=9D=90=9E=F0=9D=90=9A=F0=9D=90=A4?= =?UTF-8?q?=F0=9D=90=A8=F0=9D=90=B0=F0=9D=90=9A?= <27560638+Teakowa@users.noreply.github.com> Date: Mon, 17 Aug 2026 15:41:44 +0800 Subject: [PATCH 1/2] chore(ci): skip Rust CI for docs-only changes --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ac29ee..21a500a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,46 @@ env: CARGO_TERM_COLOR: always jobs: + changes: + name: Classify changes + runs-on: ubuntu-latest + outputs: + rust: ${{ steps.classify.outputs.rust }} + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 + - name: Classify changed paths + id: classify + shell: bash + env: + EVENT_NAME: ${{ github.event_name }} + PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} + PUSH_BASE_SHA: ${{ github.event.before }} + run: | + set -euo pipefail + if [[ "$EVENT_NAME" == "pull_request" ]]; then + base="$PR_BASE_SHA" + else + base="$PUSH_BASE_SHA" + fi + + if [[ -z "$base" || "$base" =~ ^0+$ ]]; then + echo "rust=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + + files="$(git diff --name-only "$base" "$GITHUB_SHA")" + printf '%s\n' "$files" + if grep -Eq '^(crates/|Cargo\.(toml|lock)$|\.github/workflows/ci\.yml$)' <<< "$files"; then + echo "rust=true" >> "$GITHUB_OUTPUT" + else + echo "rust=false" >> "$GITHUB_OUTPUT" + fi + check: + needs: changes + if: needs.changes.outputs.rust == 'true' name: fmt, clippy, tests (${{ matrix.toolchain }}) runs-on: ubuntu-latest strategy: From a00d0a4795a35c05072074fb4292d070510a14d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=90=93=F0=9D=90=9E=F0=9D=90=9A=F0=9D=90=A4?= =?UTF-8?q?=F0=9D=90=A8=F0=9D=90=B0=F0=9D=90=9A?= <27560638+Teakowa@users.noreply.github.com> Date: Mon, 17 Aug 2026 15:50:31 +0800 Subject: [PATCH 2/2] chore(ci): simplify docs-only filtering --- .github/workflows/ci.yml | 45 ++++++---------------------------------- 1 file changed, 6 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21a500a..c778962 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,52 +3,19 @@ name: CI on: push: branches: ["main"] + paths-ignore: + - "**/*.md" + - "docs/**" pull_request: + paths-ignore: + - "**/*.md" + - "docs/**" env: CARGO_TERM_COLOR: always jobs: - changes: - name: Classify changes - runs-on: ubuntu-latest - outputs: - rust: ${{ steps.classify.outputs.rust }} - steps: - - uses: actions/checkout@v7 - with: - fetch-depth: 0 - - name: Classify changed paths - id: classify - shell: bash - env: - EVENT_NAME: ${{ github.event_name }} - PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} - PUSH_BASE_SHA: ${{ github.event.before }} - run: | - set -euo pipefail - if [[ "$EVENT_NAME" == "pull_request" ]]; then - base="$PR_BASE_SHA" - else - base="$PUSH_BASE_SHA" - fi - - if [[ -z "$base" || "$base" =~ ^0+$ ]]; then - echo "rust=true" >> "$GITHUB_OUTPUT" - exit 0 - fi - - files="$(git diff --name-only "$base" "$GITHUB_SHA")" - printf '%s\n' "$files" - if grep -Eq '^(crates/|Cargo\.(toml|lock)$|\.github/workflows/ci\.yml$)' <<< "$files"; then - echo "rust=true" >> "$GITHUB_OUTPUT" - else - echo "rust=false" >> "$GITHUB_OUTPUT" - fi - check: - needs: changes - if: needs.changes.outputs.rust == 'true' name: fmt, clippy, tests (${{ matrix.toolchain }}) runs-on: ubuntu-latest strategy: