Implement PR workflow for running test262 on babel PRs (#10579)
* Implement PR workflow with test262 * revisions
This commit is contained in:
parent
7633f09479
commit
67ea7f4b4d
@ -40,6 +40,9 @@ aliases:
|
|||||||
- &artifact_test262_xunit
|
- &artifact_test262_xunit
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
|
|
||||||
|
- &artifact_test262_diff_tap
|
||||||
|
path: ~/diff.tap
|
||||||
|
|
||||||
executors:
|
executors:
|
||||||
node-executor:
|
node-executor:
|
||||||
docker:
|
docker:
|
||||||
@ -73,6 +76,14 @@ jobs:
|
|||||||
executor: node-executor
|
executor: node-executor
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- 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-yarn-cache
|
||||||
- restore_cache: *restore-node-modules-cache
|
- restore_cache: *restore-node-modules-cache
|
||||||
- run:
|
- run:
|
||||||
@ -100,16 +111,34 @@ jobs:
|
|||||||
yarn link $(./jq -j ".name" $package)
|
yarn link $(./jq -j ".name" $package)
|
||||||
done
|
done
|
||||||
node lib/download-node
|
node lib/download-node
|
||||||
|
- run:
|
||||||
|
name: Download master branch Test262 artifact
|
||||||
|
command: node lib/download-master-artifact ~/master.tap
|
||||||
|
<<: *test262_workdir
|
||||||
- run:
|
- run:
|
||||||
name: Run Test262
|
name: Run Test262
|
||||||
command: node lib/run-tests I_AM_SURE | tee ~/test262.tap
|
command: node lib/run-tests I_AM_SURE | tee ~/test262.tap
|
||||||
<<: *test262_workdir
|
<<: *test262_workdir
|
||||||
- store_artifacts: *artifact_test262_tap
|
- store_artifacts: *artifact_test262_tap
|
||||||
- run:
|
- run:
|
||||||
name: Output test262 results
|
name: Output Test262 results
|
||||||
command: |
|
command: |
|
||||||
cat ~/test262.tap | $(npm bin)/tap-mocha-reporter spec || true
|
cat ~/test262.tap | $(npm bin)/tap-mocha-reporter spec || true
|
||||||
<<: *test262_workdir
|
<<: *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:
|
publish-verdaccio:
|
||||||
executor: node-executor
|
executor: node-executor
|
||||||
@ -136,15 +165,20 @@ workflows:
|
|||||||
test:
|
test:
|
||||||
jobs:
|
jobs:
|
||||||
- test
|
- test
|
||||||
|
test262-master:
|
||||||
master:
|
|
||||||
jobs:
|
jobs:
|
||||||
- test262:
|
- test262:
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
test262:
|
||||||
|
jobs:
|
||||||
|
- approve-test262-run:
|
||||||
|
type: approval
|
||||||
|
- test262:
|
||||||
|
requires:
|
||||||
|
- approve-test262-run
|
||||||
e2e:
|
e2e:
|
||||||
jobs:
|
jobs:
|
||||||
- publish-verdaccio
|
- publish-verdaccio
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user