CI: ci.yml triggers full check on every push — add source path filters to skip doc/CI-only commits #493

Closed
opened 2026-06-06 15:36:26 +00:00 by guettlibot · 0 comments
guettlibot commented 2026-06-06 15:36:26 +00:00 (Migrated from codeberg.org)

Problem

ci.yml triggers on all pushes to any branch with no path filtering:

on: [push, pull_request]

A commit that only changes docs, CI workflow files, the website, or scripts that aren't tested by the check suite still triggers the full 20–30 min task check-dagger run. This wastes runner time and delays unrelated CI jobs.

Fix

Add a paths filter so the check only runs when code that it actually tests changes:

on:
  push:
    paths:
      - 'lib/**'
      - 'test/**'
      - 'integration_test/**'
      - 'android/**'
      - 'linux/**'
      - 'pubspec.yaml'
      - 'pubspec.lock'
      - 'analysis_options.yaml'
      - 'drift_schemas/**'
      - 'ci/**'
      - 'scripts/**'
      - '.forgejo/workflows/ci.yml'
      - '.forgejo/Dockerfile'
  pull_request:
    paths:
      - 'lib/**'
      - 'test/**'
      - 'integration_test/**'
      - 'android/**'
      - 'linux/**'
      - 'pubspec.yaml'
      - 'pubspec.lock'
      - 'analysis_options.yaml'
      - 'drift_schemas/**'
      - 'ci/**'
      - 'scripts/**'
      - '.forgejo/workflows/ci.yml'
      - '.forgejo/Dockerfile'

Commits that only touch website/, docs/, *.md, or .forgejo/workflows/deploy.yml etc. will skip the check and be validated by the deploy or website workflow instead.

Expected impact

  • Eliminates full CI runs for doc-only / CI-config-only / website commits.
  • Faster merge cycles for non-code changes.
  • No loss of correctness — deploy.yml already has its own change detection.

Files to change

  • .forgejo/workflows/ci.yml
## Problem `ci.yml` triggers on **all** pushes to any branch with no path filtering: ```yaml on: [push, pull_request] ``` A commit that only changes docs, CI workflow files, the website, or scripts that aren't tested by the check suite still triggers the full 20–30 min `task check-dagger` run. This wastes runner time and delays unrelated CI jobs. ## Fix Add a `paths` filter so the check only runs when code that it actually tests changes: ```yaml on: push: paths: - 'lib/**' - 'test/**' - 'integration_test/**' - 'android/**' - 'linux/**' - 'pubspec.yaml' - 'pubspec.lock' - 'analysis_options.yaml' - 'drift_schemas/**' - 'ci/**' - 'scripts/**' - '.forgejo/workflows/ci.yml' - '.forgejo/Dockerfile' pull_request: paths: - 'lib/**' - 'test/**' - 'integration_test/**' - 'android/**' - 'linux/**' - 'pubspec.yaml' - 'pubspec.lock' - 'analysis_options.yaml' - 'drift_schemas/**' - 'ci/**' - 'scripts/**' - '.forgejo/workflows/ci.yml' - '.forgejo/Dockerfile' ``` Commits that only touch `website/`, `docs/`, `*.md`, or `.forgejo/workflows/deploy.yml` etc. will skip the check and be validated by the deploy or website workflow instead. ## Expected impact - Eliminates full CI runs for doc-only / CI-config-only / website commits. - Faster merge cycles for non-code changes. - No loss of correctness — `deploy.yml` already has its own change detection. ## Files to change - `.forgejo/workflows/ci.yml`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: guettli/sharedinbox#493