Skip to content

Commit

Permalink
Implement PR workflow for running test262 on babel PRs (#10579)
Browse files Browse the repository at this point in the history
* Implement PR workflow with test262

* revisions
  • Loading branch information
jbhoosreddy authored and nicolo-ribaudo committed Nov 13, 2019
1 parent 7633f09 commit 67ea7f4
Showing 1 changed file with 38 additions and 4 deletions.
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:
name: Sync with latest master branch (only on PRs)
command: |
if [ -n "$CIRCLE_PULL_REQUEST" ]
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:
only:
- master

test262:
jobs:
- approve-test262-run:
type: approval
- test262:
requires:
- approve-test262-run
e2e:
jobs:
- publish-verdaccio
Expand Down

0 comments on commit 67ea7f4

Please sign in to comment.