Skip to content

Commit

Permalink
Trigger windows e2e-tests if windows file changes
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Silva Sens <[email protected]>
  • Loading branch information
ArthurSens committed Dec 16, 2024
1 parent b00d46d commit e49d5b6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/e2e-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,22 @@ env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2

jobs:
get-changed-files:
windows-file-changed:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get changed files
id: get_changed_files
run: echo "::set-output name=files::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})"
- name: Print changed files
run: echo "${{ steps.get_changed_files.outputs.files }}"
with:
fetch-depth: 0
- name: Did windows files changed
run: echo "changed=$(./.github/workflows/scripts/is_changed_file_windows.sh )" >> "$GITHUB_OUTPUT"
- run: echo $(./.github/workflows/scripts/is_changed_file_windows.sh ${{ github.event.pull_request.base.sha }} ${{ github.sha }} )

collector-build:
runs-on: windows-latest
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push' || github.event_name == 'merge_group') }}
needs: [windows-file-changed]
if: ${{ github.actor != 'dependabot[bot]' && ((contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push' || github.event_name == 'merge_group') || needs.windows-file-changed.outputs.changed == 'true') }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit e49d5b6

Please sign in to comment.