Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshTrivedi committed Nov 27, 2024
1 parent 2db74a2 commit 71cb874
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions .github/workflows/new-entry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,32 +66,32 @@ jobs:
- name: Fetch main branch
run: git fetch origin main

- name: Verify PR file changes
run: |
echo "Checking PR for exactly two new files..."
experiment_prefix="${{ env.experiment_prefix }}"
expected_files=("experiments/outputs/${experiment_prefix}_test_challenge/leaderboard.bundle" "experiments/outputs/${experiment_prefix}_test_normal/leaderboard.bundle")
new_files=$(git diff --name-only origin/main..HEAD)
echo "Expected files:"
printf "%s\n" "${expected_files[@]}"
echo "New files in the PR:"
echo "$new_files"
# Sort and compare file lists
expected_sorted=$(printf "%s\n" "${expected_files[@]}")
actual_sorted=$(echo "$new_files" | sort)
if [[ "$expected_sorted" != "$actual_sorted" ]]; then
echo "Error: File list does not match the expected files."
echo "Expected:"
echo "$expected_sorted"
echo "Actual:"
echo "$actual_sorted"
exit 1
fi
echo "PR file check passed. The file list matches exactly."
# - name: Verify PR file changes
# run: |
# echo "Checking PR for exactly two new files..."
# experiment_prefix="${{ env.experiment_prefix }}"
# expected_files=("experiments/outputs/${experiment_prefix}_test_challenge/leaderboard.bundle" "experiments/outputs/${experiment_prefix}_test_normal/leaderboard.bundle")
# new_files=$(git diff --name-only origin/main..HEAD)

# echo "Expected files:"
# printf "%s\n" "${expected_files[@]}"
# echo "New files in the PR:"
# echo "$new_files"

# # Sort and compare file lists
# expected_sorted=$(printf "%s\n" "${expected_files[@]}")
# actual_sorted=$(echo "$new_files" | sort)

# if [[ "$expected_sorted" != "$actual_sorted" ]]; then
# echo "Error: File list does not match the expected files."
# echo "Expected:"
# echo "$expected_sorted"
# echo "Actual:"
# echo "$actual_sorted"
# exit 1
# fi

# echo "PR file check passed. The file list matches exactly."

- name: Download relevant files
run: |
Expand All @@ -111,6 +111,8 @@ jobs:
run: |
uv run appworld evaluate ${{ env.experiment_prefix }}_test_normal test_normal
uv run appworld evaluate ${{ env.experiment_prefix }}_test_challenge test_challenge
ls experiments/outputs/temp_test_test_normal/
ls experiments/outputs/temp_test_test_challenge/
- name: Make and add leaderboard entry
run: uv run appworld make ${{ env.experiment_prefix }}_test_normal ${{ env.experiment_prefix }}_test_challenge ${{env.replace_last_flag}}
Expand Down

0 comments on commit 71cb874

Please sign in to comment.