@@ -484,3 +484,133 @@ jobs:
484484 run : yarn up eslint@7.5.0
485485 - name : Run babel/eslint tests
486486 run : node ./node_modules/.bin/jest eslint
487+
488+ test262-prepare :
489+ name : test262 - Prepare for running in parallel
490+ runs-on : ubuntu-latest
491+ steps :
492+ - name : Checkout Babel
493+ uses : actions/checkout@v3
494+ - name : Use Node.js latest
495+ uses : actions/setup-node@v3
496+ - name : Checkout test runner
497+ uses : actions/checkout@v3
498+ with :
499+ repository : babel/babel-test262-runner
500+ path : babel-test262-runner
501+ - name : Download test262
502+ run : make bootstrap-test262
503+ - name : Prepare test262 chunks
504+ run : |
505+ cd babel-test262-runner
506+ npm ci
507+ node lib/prepare-chunks 8 > ~/test262-chunks.json
508+ env :
509+ TEST262_PATH : ../build/test262
510+ - name : Upload chunks artifact
511+ uses : actions/upload-artifact@v3
512+ with :
513+ name : test262-chunks
514+ path : ~/test262-chunks.json
515+ retention-days : 3
516+
517+ test262 :
518+ name : test262
519+ strategy :
520+ matrix :
521+ chunk : [0, 1, 2, 3, 4, 5, 6, 7]
522+ runs-on : ubuntu-latest
523+ needs : [build, test262-prepare]
524+ steps :
525+ - name : Checkout Babel
526+ uses : actions/checkout@v3
527+ - name : Use Node.js latest
528+ uses : actions/setup-node@v3
529+ with :
530+ node-version : " *"
531+ cache : " yarn"
532+ - name : Install
533+ run : yarn install
534+ - uses : actions/download-artifact@v3
535+ with :
536+ name : babel-artifact
537+ - name : Checkout test runner
538+ uses : actions/checkout@v3
539+ with :
540+ repository : babel/babel-test262-runner
541+ path : babel-test262-runner
542+ - name : Install test runner
543+ run : |
544+ cd babel-test262-runner
545+ npm ci
546+ node lib/download-node
547+ - name : Download test262
548+ run : make bootstrap-test262
549+ - name : Download chunks file
550+ uses : actions/download-artifact@v3
551+ with :
552+ name : test262-chunks
553+ - name : Run test262
554+ run : |
555+ cd babel-test262-runner
556+ node lib/run-tests I_AM_SURE | tee ~/test262-${{ matrix.chunk }}.tap
557+ env :
558+ BABEL_PATH : " .."
559+ TEST262_PATH : ../build/test262
560+ THREADS : 4
561+ CHUNKS_FILE : ../test262-chunks.json
562+ CHUNK : ${{ matrix.chunk }}
563+ - name : Create artifact with report results
564+ uses : actions/upload-artifact@v3
565+ with :
566+ name : test262-result-${{ matrix.chunk }}
567+ path : ~/test262-${{ matrix.chunk }}.tap
568+ retention-days : 3
569+
570+ test262-finish :
571+ name : test262 - Analyze results
572+ runs-on : ubuntu-latest
573+ needs : test262
574+ steps :
575+ - uses : actions/download-artifact@v3
576+ with : { name: test262-result-0 }
577+ - uses : actions/download-artifact@v3
578+ with : { name: test262-result-1 }
579+ - uses : actions/download-artifact@v3
580+ with : { name: test262-result-2 }
581+ - uses : actions/download-artifact@v3
582+ with : { name: test262-result-3 }
583+ - uses : actions/download-artifact@v3
584+ with : { name: test262-result-4 }
585+ - uses : actions/download-artifact@v3
586+ with : { name: test262-result-5 }
587+ - uses : actions/download-artifact@v3
588+ with : { name: test262-result-6 }
589+ - uses : actions/download-artifact@v3
590+ with : { name: test262-result-7 }
591+ - name : Merge chunk results
592+ run : |
593+ cat test262-0.tap test262-1.tap test262-2.tap test262-3.tap \
594+ test262-4.tap test262-5.tap test262-6.tap test262-7.tap \
595+ | npx tap-merge > test262.tap
596+ - name : Create artifact with report results
597+ uses : actions/upload-artifact@v3
598+ with :
599+ name : test262-result
600+ path : test262.tap
601+ - name : Checkout test runner
602+ uses : actions/checkout@v3
603+ with :
604+ repository : babel/babel-test262-runner
605+ path : babel-test262-runner
606+ # - name: Download previous results
607+ # run: |
608+ # cd babel-test262-runner
609+ # npm ci
610+ # node lib/download-main-artifact/index.mjs ~/test262-main.tap
611+ # env:
612+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
613+ # - name: Compare previous main branch & current results
614+ # run: |
615+ # cd babel-test262-runner
616+ # node lib/compare-results ~/test262-main.tap ~/test262.tap | tee ~/diff.tap
0 commit comments