Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong committed Oct 2, 2024
1 parent 5541c65 commit 5b85a83
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/check-which-tests-to-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ jobs:
ref: ${{ github.head_ref }}
- name: Git setup
run: |
git fetch origin ${{ github.base_ref }}
if [ "${{ github.event_name }}" = "pull_request" ]; then
base_sha=$(git rev-parse origin/${{ github.base_ref }})
head_sha=$(git rev-parse HEAD)
changed_files=$(git diff --name-only $base_sha $head_sha)
else
changed_files=$(git diff --name-only HEAD^)
fi
git fetch --all
- run: |
git checkout ${{ github.head_ref || github.ref_name}}
- run: |
changed_files=$(git diff --name-only $(git merge-base --fork-point origin/master HEAD) HEAD)
echo "Changed files:"
echo "$changed_files"
echo "changed_files<<EOF" >> $GITHUB_ENV
echo "$changed_files" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- id: weave_query
name: Weave Query Checks
run: |
Expand Down

0 comments on commit 5b85a83

Please sign in to comment.