Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement PR workflow for running test262 on babel PRs #10579

Merged
merged 2 commits into from Nov 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 38 additions & 4 deletions .circleci/config.yml
Expand Up @@ -40,6 +40,9 @@ aliases:
- &artifact_test262_xunit
path: ~/test-results

- &artifact_test262_diff_tap
path: ~/diff.tap

executors:
node-executor:
docker:
Expand Down Expand Up @@ -73,6 +76,14 @@ jobs:
executor: node-executor
steps:
- checkout
- run:
jbhoosreddy marked this conversation as resolved.
Show resolved Hide resolved
name: Sync with latest master branch (only on PRs)
command: |
if [ -n "$CIRCLE_PULL_REQUEST" ]
jbhoosreddy marked this conversation as resolved.
Show resolved Hide resolved
then
git fetch origin refs/pull/$CIRCLE_PR_NUMBER/merge
git checkout -qf FETCH_HEAD
fi
- restore_cache: *restore-yarn-cache
- restore_cache: *restore-node-modules-cache
- run:
Expand Down Expand Up @@ -100,16 +111,34 @@ jobs:
yarn link $(./jq -j ".name" $package)
done
node lib/download-node
- run:
name: Download master branch Test262 artifact
command: node lib/download-master-artifact ~/master.tap
<<: *test262_workdir
- run:
name: Run Test262
command: node lib/run-tests I_AM_SURE | tee ~/test262.tap
<<: *test262_workdir
- store_artifacts: *artifact_test262_tap
- run:
name: Output test262 results
name: Output Test262 results
command: |
cat ~/test262.tap | $(npm bin)/tap-mocha-reporter spec || true
<<: *test262_workdir
- run:
name: Compare previous master branch & current job results
command: |
mkdir -p ~/test-results/test262
node lib/compare-results ~/master.tap ~/test262.tap | tee ~/diff.tap
<<: *test262_workdir
- store_artifacts: *artifact_test262_diff_tap
- run:
name: Output comparision results and report to CircleCI
command: |
mkdir -p ~/test-results/test262
cat ~/diff.tap | $(npm bin)/tap-merge | $(npm bin)/tap-mocha-reporter xunit | tee ~/test-results/test262/results.xml
<<: *test262_workdir
- store_test_results: *artifact_test262_xunit

publish-verdaccio:
executor: node-executor
Expand All @@ -136,15 +165,20 @@ workflows:
test:
jobs:
- test

master:
test262-master:
jobs:
- test262:
filters:
branches:
jbhoosreddy marked this conversation as resolved.
Show resolved Hide resolved
only:
- master

test262:
jobs:
- approve-test262-run:
JLHwung marked this conversation as resolved.
Show resolved Hide resolved
type: approval
- test262:
requires:
- approve-test262-run
e2e:
jobs:
- publish-verdaccio
Expand Down