Skip to content

Commit

Permalink
Merge pull request #4418 from DataDog/lloeki/dynamic-change-evaluation
Browse files Browse the repository at this point in the history
Use dynamic evaluation instead of static path filter
  • Loading branch information
lloeki authored Feb 20, 2025
2 parents 6eb7603 + 4fbdaa8 commit 9ac1f2c
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 30 deletions.
46 changes: 32 additions & 14 deletions .github/workflows/parametric-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,42 @@ name: Parametric Tests
on:
push:
branches:
- "**"
paths-ignore:
- ".circleci/**"
- ".gitlab/**"
- "appraisal/**"
- "benchmarks/**"
- "docs/**"
- "gemfiles/**"
- "integration/**"
- "sig/**"
- "spec/**"
- "suppressions/**"
- "tools/**"
- "vendor/**"
- master
pull_request:
branches:
- master
workflow_dispatch: {}
schedule:
- cron: "00 04 * * 2-6"

jobs:
changes:
name: Changes
runs-on: ubuntu-24.04
outputs:
changes: ${{ steps.changes.outputs.src }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
src:
- '.github/workflows/**'
- 'lib/**'
- 'ext/**'
- '*.gemspec'
- 'Gemfile'
- '*.gemfile'
- 'lib-injection/**'
- 'tasks/**'
build-artifacts:
needs:
- changes
if: ${{ needs.changes.outputs.changes == 'true' }}
runs-on: ubuntu-22.04
permissions:
packages: write
Expand All @@ -40,6 +56,8 @@ jobs:
parametric:
needs:
- build-artifacts
- changes
if: ${{ needs.changes.outputs.changes == 'true' }}
uses: DataDog/system-tests/.github/workflows/run-parametric.yml@main
secrets: inherit
with:
Expand Down
53 changes: 37 additions & 16 deletions .github/workflows/system-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,10 @@ name: System Tests
on:
push:
branches:
- "**"
paths-ignore:
- ".circleci/**"
- ".gitlab/**"
- "appraisal/**"
- "benchmarks/**"
- "docs/**"
- "gemfiles/**"
- "integration/**"
- "sig/**"
- "spec/**"
- "suppressions/**"
- "tools/**"
- "vendor/**"
- master
pull_request:
branches:
- master
workflow_dispatch: {}
schedule:
- cron: "00 04 * * 2-6"
Expand All @@ -27,7 +17,33 @@ env:
SYSTEM_TESTS_REF: main # This must always be set to `main` on dd-trace-rb's master branch

jobs:
changes:
name: Changes
runs-on: ubuntu-24.04
outputs:
changes: ${{ steps.changes.outputs.src }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
src:
- '.github/workflows/**'
- 'lib/**'
- 'ext/**'
- '*.gemspec'
- 'Gemfile'
- '*.gemfile'
- 'lib-injection/**'
- 'tasks/**'
build-harness:
needs:
- changes
if: ${{ needs.changes.outputs.changes == 'true' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -92,6 +108,9 @@ jobs:
docker push ${{ env.REPO }}/system-tests/${{ matrix.image.name }}:latest
build-apps:
needs:
- changes
if: ${{ needs.changes.outputs.changes == 'true' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -391,7 +410,8 @@ jobs:
- build-harness
- build-apps
- test
if: ${{ always() }}
- changes
if: ${{ needs.changes.outputs.changes == 'true' && !cancelled() }}
name: Aggregate (${{ matrix.app }})
steps:
- name: Setup python 3.12
Expand Down Expand Up @@ -445,7 +465,8 @@ jobs:
runs-on: ubuntu-22.04
needs:
- test
if: ${{ always() }}
- changes
if: ${{ needs.changes.outputs.changes == 'true' && always() }}
name: Cleanup (${{ matrix.image }})
steps:
- name: Log in to the Container registry
Expand Down

0 comments on commit 9ac1f2c

Please sign in to comment.