Skip to content

Commit

Permalink
Fix workflow merging issue for performance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
OlimpiaZurek committed Feb 15, 2024
1 parent 2e3840f commit 8ce6593
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/reassurePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup NodeJS
uses: ./.github/actions/composite/setupNode
Expand All @@ -22,6 +24,22 @@ jobs:
git config --global user.email "test@test.com"
git config --global user.name "Test"
- name: Get common ancestor commit
run: |
git fetch origin main
common_ancestor=$(git merge-base "${{ github.sha }}" origin/main)
echo "COMMIT_HASH=$common_ancestor" >> "$GITHUB_ENV"
- name: Clean up deleted files
run: |
DELETED_FILES=$(git diff --name-only --diff-filter=D "$COMMIT_HASH" "${{ github.sha }}")
for file in $DELETED_FILES; do
if [ -n "$file" ]; then
rm -f "$file"
echo "Deleted file: $file"
fi
done
- name: Run performance testing script
shell: bash
run: |
Expand Down

0 comments on commit 8ce6593

Please sign in to comment.