diff --git a/.github/workflows/automated-ci.yml b/.github/workflows/automated-ci.yml index d83ce3b9c..beee1421c 100644 --- a/.github/workflows/automated-ci.yml +++ b/.github/workflows/automated-ci.yml @@ -8,6 +8,8 @@ jobs: test_suite: uses: ./.github/workflows/test_suite.yml secrets: inherit + with: + pr_ref: ${{ github.event.pull_request.head.sha }} rule_tester: uses: ./.github/workflows/rule-tester.yml secrets: inherit @@ -17,3 +19,5 @@ jobs: needs: rule_tester uses: ./.github/workflows/test_rule_editor_preview.yml secrets: inherit + with: + pr_ref: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/test_rule_editor_preview.yml b/.github/workflows/test_rule_editor_preview.yml index 22e632af5..2b8bd8ea1 100644 --- a/.github/workflows/test_rule_editor_preview.yml +++ b/.github/workflows/test_rule_editor_preview.yml @@ -2,7 +2,17 @@ name: Run Tests on Preview Deployment on: workflow_call: + inputs: + pr_ref: + description: "Git reference to checkout (for PRs)" + required: false + type: string workflow_dispatch: + inputs: + pr_number: + description: "PR number to test (leave empty for current branch)" + required: false + type: string jobs: end_to_end_test: @@ -11,12 +21,14 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 + with: + ref: ${{ inputs.pr_ref || (inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number)) || github.ref }} - name: Set up Python uses: actions/setup-python@v5 with: python-version: 3.12 - + - name: Ensure setuptools is installed run: python -m ensurepip --upgrade && python -m pip install --upgrade pip setuptools diff --git a/.github/workflows/test_suite.yml b/.github/workflows/test_suite.yml index 042785fc7..e42987f53 100644 --- a/.github/workflows/test_suite.yml +++ b/.github/workflows/test_suite.yml @@ -1,7 +1,17 @@ name: CORE Test Suite Validation on: workflow_call: + inputs: + pr_ref: + description: "Git reference to checkout (for PRs)" + required: false + type: string workflow_dispatch: + inputs: + pr_number: + description: "PR number to test (leave empty for current branch)" + required: false + type: string env: DATASET_SIZE_THRESHOLD: 1000000000 jobs: @@ -10,7 +20,8 @@ jobs: steps: - name: Get Engine Changes uses: actions/checkout@v4 - + with: + ref: ${{ inputs.pr_ref || (inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number)) || github.ref }} - name: Get Test Suite Repository uses: actions/checkout@v4 with: