Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
58 changes: 56 additions & 2 deletions .github/workflows/trigger-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ name: Trigger Integration Tests

on:
pull_request:
types: [opened, synchronize, reopened, labeled]
types: [opened, synchronize, reopened, labeled, closed]
merge_group: # Trigger when added to merge queue

jobs:
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
# checks would block every PR that doesn't bother labelling.
# =============================================================================
skip-integration-tests-pr:
if: github.event_name == 'pull_request' && github.event.action != 'labeled'
if: github.event_name == 'pull_request' && github.event.action != 'labeled' && github.event.action != 'closed'
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
Expand Down Expand Up @@ -449,3 +449,57 @@ jobs:
}
});
}

# =============================================================================
# After merge: trigger the multi-language coverage fan-out.
# Fires when a PR lands on main (merge queue or direct merge) and touched
Comment thread
peco-review-bot[bot] marked this conversation as resolved.
# driver source. Dispatches `coverage-fanout` to databricks-driver-test, whose
# coverage-fanout-tracker.yml opens a tracking issue and runs the
# language-agnostic fan-out (a spec authored from THIS PR's diff, conformed as
# tests across every driver) as peco-engineer-bot.
Comment thread
peco-review-bot[bot] marked this conversation as resolved.
# =============================================================================
trigger-coverage-fanout:
if: |
github.event_name == 'pull_request' &&
github.event.action == 'closed' &&
Comment thread
peco-review-bot[bot] marked this conversation as resolved.
github.event.pull_request.merged == true
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
Comment thread
peco-review-bot[bot] marked this conversation as resolved.
steps:
- name: Check if driver source changed
id: changed
Comment thread
peco-review-bot[bot] marked this conversation as resolved.
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # pinned
with:
script: |
const files = await github.paginate(github.rest.pulls.listFiles, {
Comment thread
eric-wang-1990 marked this conversation as resolved.
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
per_page: 100,
});
// The whole repo IS the driver. Count a merge as source-affecting when it changes a file under src/.
Comment thread
peco-review-bot[bot] marked this conversation as resolved.
// Docs/CI/test-only merges do not warrant a full multi-language fan-out.
const isSource = (f) => f.startsWith('src/');
const srcChanged = files.some((f) => isSource(f.filename));
console.log(`driver source changed: ${srcChanged}`);
core.setOutput('source', srcChanged.toString());

- name: Generate GitHub App token (databricks-driver-test)
if: steps.changed.outputs.source == 'true'
id: app-token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # pinned
with:
app-id: ${{ secrets.INTEGRATION_TEST_APP_ID }}
private-key: ${{ secrets.INTEGRATION_TEST_PRIVATE_KEY }}
owner: databricks
repositories: databricks-driver-test

- name: Dispatch coverage-fanout
if: steps.changed.outputs.source == 'true'
Comment thread
peco-review-bot[bot] marked this conversation as resolved.
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
with:
Comment thread
peco-review-bot[bot] marked this conversation as resolved.
token: ${{ steps.app-token.outputs.token }}
repository: databricks/databricks-driver-test
event-type: coverage-fanout
client-payload: '{"reference_repo": "${{ github.repository }}", "pr_number": "${{ github.event.pull_request.number }}", "pr_url": "${{ github.event.pull_request.html_url }}"}'
Loading