diff --git a/.github/workflows/integration-approve.yml b/.github/workflows/integration-approve.yml deleted file mode 100644 index 7598bf453d..0000000000 --- a/.github/workflows/integration-approve.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: integration-approve - -on: - merge_group: - -jobs: - # Trigger for merge groups. - # - # Statuses and checks apply to specific commits (by hash). - # Enforcement of required checks is done both at the PR level and the merge queue level. - # In case of multiple commits in a single PR, the hash of the squashed commit - # will not match the one for the latest (approved) commit in the PR. - # - # We auto approve the check for the merge queue for two reasons: - # - # * Queue times out due to duration of tests. - # * Avoid running integration tests twice, since it was already run at the tip of the branch before squashing. - # - trigger: - runs-on: - group: databricks-deco-testing-runner-group - labels: ubuntu-latest-deco - - steps: - - name: Auto-approve squashed commit - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: |- - gh api -X POST -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - /repos/${{ github.repository }}/statuses/${{ github.sha }} \ - -f 'state=success' \ - -f 'context=Integration Tests Check' diff --git a/.github/workflows/integration-main.yml b/.github/workflows/integration-main.yml deleted file mode 100644 index 96e13be29a..0000000000 --- a/.github/workflows/integration-main.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: integration-main - -on: - push: - branches: - - main - -jobs: - # Trigger for pushes to the main branch. - # - # This workflow triggers the integration test workflow in a different repository. - # It requires secrets from the "test-trigger-is" environment, which are only available to authorized users. - trigger: - runs-on: - group: databricks-deco-testing-runner-group - labels: ubuntu-latest-deco - - environment: "test-trigger-is" - - steps: - - name: Generate GitHub App Token - id: generate-token - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 - with: - app-id: ${{ secrets.DECO_WORKFLOW_TRIGGER_APP_ID }} - private-key: ${{ secrets.DECO_WORKFLOW_TRIGGER_PRIVATE_KEY }} - owner: ${{ secrets.ORG_NAME }} - repositories: ${{secrets.REPO_NAME}} - - - name: Trigger Workflow in Another Repo - env: - GH_TOKEN: ${{ steps.generate-token.outputs.token }} - run: |- - gh workflow run cli-isolated-nightly.yml -R ${{ secrets.ORG_NAME }}/${{secrets.REPO_NAME}} \ - --ref main \ - -f commit_sha=${{ github.event.after }} diff --git a/.github/workflows/integration-pr.yml b/.github/workflows/integration-pr.yml deleted file mode 100644 index 4ebb242564..0000000000 --- a/.github/workflows/integration-pr.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: integration-pr - -on: - pull_request: - types: [opened, synchronize] - -jobs: - # Trigger for pull requests. - # - # This workflow triggers the integration test workflow in a different repository. - # It requires secrets from the "test-trigger-is" environment, which are only available to authorized users. - trigger: - runs-on: - group: databricks-deco-testing-runner-group - labels: ubuntu-latest-deco - - environment: "test-trigger-is" - - # Only run this job for PRs from branches on the main repository and not from forks. - # Workflows triggered by PRs from forks don't have access to the "test-trigger-is" environment. - if: "${{ !github.event.pull_request.head.repo.fork }}" - - steps: - - name: Generate GitHub App Token - id: generate-token - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 - with: - app-id: ${{ secrets.DECO_WORKFLOW_TRIGGER_APP_ID }} - private-key: ${{ secrets.DECO_WORKFLOW_TRIGGER_PRIVATE_KEY }} - owner: ${{ secrets.ORG_NAME }} - repositories: ${{secrets.REPO_NAME}} - - - name: Trigger Workflow in Another Repo - env: - GH_TOKEN: ${{ steps.generate-token.outputs.token }} - run: |- - gh workflow run cli-isolated-pr.yml -R ${{ secrets.ORG_NAME }}/${{secrets.REPO_NAME}} \ - --ref main \ - -f pull_request_number=${{ github.event.pull_request.number }} \ - -f commit_sha=${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e2fbbf306c..4efa833975 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -334,3 +334,77 @@ jobs: exit 1 fi + + # Trigger integration tests in a separate repository. + # Requires secrets from "test-trigger-is" environment (not available for fork PRs). + # Auto-approves for merge groups to avoid running twice and queue timeouts. + integration-trigger: + needs: + - testmask + + if: >- + (github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork) || + (github.event_name == 'merge_group') || + (github.event_name == 'push') + + runs-on: + group: databricks-deco-testing-runner-group + labels: ubuntu-latest-deco + + environment: "test-trigger-is" + + steps: + - name: Generate GitHub App Token + if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }} + id: generate-token + uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + with: + app-id: ${{ secrets.DECO_WORKFLOW_TRIGGER_APP_ID }} + private-key: ${{ secrets.DECO_WORKFLOW_TRIGGER_PRIVATE_KEY }} + owner: ${{ secrets.ORG_NAME }} + repositories: ${{ secrets.REPO_NAME }} + + # Trigger integration tests if the primary "test" target is triggered by this change. + - name: Trigger integration tests (pull request) + if: ${{ github.event_name == 'pull_request' && contains(fromJSON(needs.testmask.outputs.targets), 'test') }} + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + run: |- + gh workflow run cli-isolated-pr.yml -R ${{ secrets.ORG_NAME }}/${{ secrets.REPO_NAME }} \ + --ref main \ + -f pull_request_number=${{ github.event.pull_request.number }} \ + -f commit_sha=${{ github.event.pull_request.head.sha }} + + # Skip integration tests if the primary "test" target is not triggered by this change. + - name: Skip integration tests (pull request) + if: ${{ github.event_name == 'pull_request' && !contains(fromJSON(needs.testmask.outputs.targets), 'test') }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: |- + gh api -X POST -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + /repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }} \ + -f 'state=success' \ + -f 'context=Integration Tests Check' \ + -f 'description=⏭️ Skipped' + + - name: Auto-approve for merge group + if: ${{ github.event_name == 'merge_group' }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: |- + gh api -X POST -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + /repos/${{ github.repository }}/statuses/${{ github.sha }} \ + -f 'state=success' \ + -f 'context=Integration Tests Check' \ + -f 'description=⏭️ Skipped' + + - name: Trigger integration tests (push to main) + if: ${{ github.event_name == 'push' }} + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + run: |- + gh workflow run cli-isolated-nightly.yml -R ${{ secrets.ORG_NAME }}/${{ secrets.REPO_NAME }} \ + --ref main \ + -f commit_sha=${{ github.event.after }} diff --git a/experimental/apps-mcp/hello.txt b/experimental/apps-mcp/hello.txt new file mode 100644 index 0000000000..e69de29bb2