-
-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This improves several things in the CI workflows: - More conformant Test262 result generation - Benchmarks should now show comments for all users - Added Test262 result comparison comments to Pull Requests
- Loading branch information
Showing
20 changed files
with
1,066 additions
and
723 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
on: [pull_request] | ||
on: [pull_request_target] | ||
name: Benchmarks | ||
jobs: | ||
runBenchmark: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
- master | ||
tags: | ||
- v* | ||
pull_request: | ||
pull_request_target: | ||
branches: | ||
- master | ||
|
||
|
@@ -36,7 +36,6 @@ jobs: | |
|
||
# Run the test suite and upload the results | ||
- name: Checkout GitHub pages | ||
if: github.event_name == 'push' | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: gh-pages | ||
|
@@ -45,16 +44,55 @@ jobs: | |
- name: Run the test262 test suite | ||
run: | | ||
cd boa | ||
cargo run --release --bin boa_tester -- -o ../gh-pages/test262 | ||
mkdir ../results | ||
cargo run --release --bin boa_tester -- run -o ../results/test262 | ||
cd .. | ||
# Run the results comparison | ||
- name: Compare results | ||
if: github.event_name == 'pull_request_target' | ||
id: compare | ||
shell: bash | ||
run: | | ||
cd boa | ||
echo "::set-output name=comment::$(./target/release/boa_tester compare ../gh-pages/test262/refs/heads/master/latest.json ../results/test262/pull/latest.json -m)" | ||
- name: Get the PR number | ||
if: github.event_name == 'pull_request_target' | ||
id: pr-number | ||
uses: kkak10/[email protected] | ||
|
||
- name: Find Previous Comment | ||
if: github.event_name == 'pull_request_target' | ||
uses: peter-evans/find-comment@v1 | ||
id: previous-comment | ||
with: | ||
issue-number: ${{ steps.pr-number.outputs.pr }} | ||
comment-author: actions-user | ||
body-includes: Test262 conformance changes | ||
|
||
- name: Update comment | ||
if: github.event_name == 'pull_request_target' && steps.previous-comment.outputs.comment-id | ||
uses: peter-evans/create-or-update-comment@v1 | ||
with: | ||
comment-id: ${{ steps.previous-comment.outputs.comment-id }} | ||
body: ${{ steps.compare.outputs.comment }} | ||
|
||
- name: Write a new comment | ||
if: github.event_name == 'pull_request_target' && !steps.previous-comment.outputs.comment-id | ||
uses: peter-evans/create-or-update-comment@v1 | ||
with: | ||
issue-number: ${{ steps.pr-number.outputs.pr }} | ||
body: ${{ steps.compare.outputs.comment }} | ||
|
||
# Commit changes to GitHub pages. | ||
- name: Commit files | ||
if: github.event_name == 'push' | ||
run: | | ||
cp ./results/test262/* ./gh-pages/test262/ | ||
cd gh-pages | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git pull --ff-only | ||
git add test262 | ||
git commit -m "Add new test262 results" -a | ||
cd .. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.