Skip to content
Merged
Changes from all 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
74 changes: 56 additions & 18 deletions .github/workflows/pr-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,70 @@ name: PR Build and Test
on:
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/FUNDING.yml'
- '.github/copilot-instructions.md'
- 'LICENSE'
- '.gitignore'
- '.gitattributes'
- '.editorconfig'
- '.vsconfig'
- '.filenesting.json'
- '.vscode/**'
- 'Assets/**'

# Allow manual trigger for testing
workflow_dispatch:

permissions:
contents: read

concurrency:
group: pr-build-test-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
DOTNET_VERSION: '10.0.x'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

jobs:
changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
src: ${{ steps.filter.outputs.src }}
docs: ${{ steps.filter.outputs.docs }}

steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src:
- 'src/**'
- '!src/**/*.md'
- 'tests/**'
- '!tests/**/*.md'
- '*.sln'
- '*.props'
- 'global.json'
- '.github/workflows/pr-build-test.yml'
docs:
- '**/*.md'
- 'docs/**'
- '.github/workflows/pr-build-test.yml'

docs:
name: Documentation Check
needs: changes
if: needs.changes.outputs.docs == 'true' && needs.changes.outputs.src == 'false'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Documentation Check Complete
run: echo "✅ Documentation-only changes, no build required"

build:
name: Build ${{ matrix.target.name }}
needs: changes
if: needs.changes.outputs.src == 'true'
runs-on: windows-latest

strategy:
Expand Down Expand Up @@ -106,8 +144,8 @@ jobs:
test-summary:
name: Test Summary
runs-on: windows-latest
needs: test
if: always()
needs: [changes, test]
if: always() && needs.changes.outputs.src == 'true'

steps:
- name: Checkout code
Expand Down
Loading