Skip to content

Commit

Permalink
Use changed-files action in ESMeta job as well
Browse files Browse the repository at this point in the history
Since we are using it in the other jobs, we may as well use it here. As a
bonus, it will make the job work even if the target of the pull request
isn't the main branch.
  • Loading branch information
ptomato committed Nov 5, 2024
1 parent dd4e719 commit 172e00b
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/esmeta-test262.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,20 @@ jobs:
- name: build esmeta
working-directory: ${{ env.ESMETA_HOME }}
run: sbt assembly

- name: Identify new or changed tests
id: changed_tests
uses: tj-actions/changed-files@v45
with:
files: test/

- name: run test262
if: steps.changed_tests.outputs.any_changed == 'true'
env:
CHANGED: ${{ steps.changed_tests.outputs.all_changed_files }}
run: |
git fetch origin main
paths=$(git diff --diff-filter ACMR --name-only origin/main.. -- test/)
if [ "$paths" == "" ]; then
echo No test files added or modified. Exiting.
exit 0
fi
echo New or modified test files:
echo "$paths"
"${ESMETA_HOME}"/bin/esmeta test262-test -status -test262dir=$(pwd) $paths
for file in $CHANGED; do
echo $file
done
"${ESMETA_HOME}"/bin/esmeta test262-test -status -test262dir=$(pwd) $CHANGED

0 comments on commit 172e00b

Please sign in to comment.