Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,32 @@
name: CI

jobs:
# Detect what files have changed to conditionally run jobs
changes:
runs-on: ubuntu-latest
outputs:
docs-only: ${{ steps.filter.outputs.docs-only }}
code: ${{ steps.filter.outputs.code }}
steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4

- name: Check for file changes
uses: dorny/paths-filter@v3
Comment thread Fixed
id: filter
with:
filters: |
docs-only:
- 'documentation/**'
code:
- '!documentation/**'

rust-format:
name: Check Rust Code Format
runs-on: ubuntu-latest
needs: changes
# Skip Rust formatting for documentation-only changes
if: needs.changes.outputs.code == 'true' || github.event_name != 'pull_request'
steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
Expand All @@ -26,6 +49,9 @@
rust-build-and-test:
name: Build and Test Rust Project
runs-on: goose
needs: changes
# Skip expensive Rust build and test for documentation-only changes
if: needs.changes.outputs.code == 'true' || github.event_name != 'pull_request'
steps:
# Add disk space cleanup before linting
- name: Check disk space before build
Expand Down Expand Up @@ -144,6 +170,9 @@
desktop-lint:
name: Lint Electron Desktop App
runs-on: macos-latest
needs: changes
# Skip desktop linting for documentation-only changes since it only checks TypeScript/React code
if: needs.changes.outputs.code == 'true' || github.event_name != 'pull_request'
steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
Expand All @@ -160,6 +189,8 @@
# Faster Desktop App build for PRs only
bundle-desktop-unsigned:
uses: ./.github/workflows/bundle-desktop.yml
if: github.event_name == 'pull_request' || github.event_name == 'merge_group'
needs: changes
# Skip desktop bundle for documentation-only changes to save resources
if: (github.event_name == 'pull_request' || github.event_name == 'merge_group') && (needs.changes.outputs.code == 'true' || github.event_name != 'pull_request')
with:
signing: false
Loading