This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: pass error kind via parameter (#1788)
- Loading branch information
Showing
12 changed files
with
220 additions
and
110 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 |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
@@ -33,31 +33,28 @@ jobs: | |
uses: Swatinem/rust-cache@v1 | ||
- name: Run Test262 suite | ||
continue-on-error: true | ||
run: cargo xtask coverage --json | ||
- name: Rename the emitted file | ||
run: | | ||
mv base_results.json new_results.json | ||
run: cargo xtask coverage --json > new_results.json | ||
- name: Save test results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: new_results | ||
path: new_results.json | ||
|
||
compare: | ||
# This job compares the coverage results from this PR and the coverage results from master | ||
coverage-comparison: | ||
needs: coverage | ||
name: Compare coverage | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
# To restore once the main branch has the new command | ||
# ref: main | ||
ref: main | ||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
|
@@ -67,10 +64,55 @@ jobs: | |
uses: Swatinem/rust-cache@v1 | ||
- name: Run Test262 suite on main branch | ||
continue-on-error: true | ||
run: cargo xtask coverage --json | ||
run: cargo xtask coverage --json > base_results.json | ||
- name: Download PRs test results | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: new_results | ||
- name: Compare results on ${{ matrix.os }} | ||
run: cargo xtask compare ./base_results.json ./new_results.json --markdown | ||
if: github.event_name == 'pull_request' | ||
id: comparison | ||
shell: bash | ||
run: | | ||
comment="$(cargo xtask compare ./base_results.json ./new_results.json --markdown)" | ||
comment="${comment//'%'/'%25'}" | ||
comment="${comment//$'\n'/'%0A'}" | ||
comment="${comment//$'\r'/'%0D'}" | ||
echo "::set-output name=comment::$comment" | ||
- name: Get the PR number | ||
if: github.event_name == 'pull_request' | ||
id: pr-number | ||
uses: kkak10/[email protected] | ||
|
||
- name: Find Previous Comment | ||
if: github.event_name == 'pull_request' | ||
uses: peter-evans/[email protected] | ||
id: previous-comment | ||
with: | ||
issue-number: ${{ steps.pr-number.outputs.pr }} | ||
body-includes: Test262 conformance changes | ||
|
||
- name: Update comment | ||
if: github.event_name == 'pull_request' && steps.previous-comment.outputs.comment-id | ||
uses: peter-evans/[email protected] | ||
continue-on-error: true | ||
with: | ||
comment-id: ${{ steps.previous-comment.outputs.comment-id }} | ||
body: | | ||
### Test262 comparison coverage results on ${{ matrix.os }} | ||
${{ steps.comparison.outputs.comment }} | ||
edit-mode: replace | ||
|
||
- name: Write a new comment | ||
if: github.event_name == 'pull_request' && !steps.previous-comment.outputs.comment-id | ||
uses: peter-evans/[email protected] | ||
continue-on-error: true | ||
with: | ||
issue-number: ${{ steps.pr-number.outputs.pr }} | ||
body: | | ||
### Test262 comparison coverage results on ${{ matrix.os }} | ||
${{ steps.comparison.outputs.comment }} | ||
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
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
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
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
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.