Skip to content

Commit

Permalink
Run test262 again (#15001)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Oct 6, 2022
1 parent 4fb29a3 commit 367d4ed
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 1 deletion.
130 changes: 130 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -484,3 +484,133 @@ jobs:
run: yarn up eslint@7.5.0
- name: Run babel/eslint tests
run: node ./node_modules/.bin/jest eslint

test262-prepare:
name: test262 - Prepare for running in parallel
runs-on: ubuntu-latest
steps:
- name: Checkout Babel
uses: actions/checkout@v3
- name: Use Node.js latest
uses: actions/setup-node@v3
- name: Checkout test runner
uses: actions/checkout@v3
with:
repository: babel/babel-test262-runner
path: babel-test262-runner
- name: Download test262
run: make bootstrap-test262
- name: Prepare test262 chunks
run: |
cd babel-test262-runner
npm ci
node lib/prepare-chunks 8 > ~/test262-chunks.json
env:
TEST262_PATH: ../build/test262
- name: Upload chunks artifact
uses: actions/upload-artifact@v3
with:
name: test262-chunks
path: ~/test262-chunks.json
retention-days: 3

test262:
name: test262
strategy:
matrix:
chunk: [0, 1, 2, 3, 4, 5, 6, 7]
runs-on: ubuntu-latest
needs: [build, test262-prepare]
steps:
- name: Checkout Babel
uses: actions/checkout@v3
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
cache: "yarn"
- name: Install
run: yarn install
- uses: actions/download-artifact@v3
with:
name: babel-artifact
- name: Checkout test runner
uses: actions/checkout@v3
with:
repository: babel/babel-test262-runner
path: babel-test262-runner
- name: Install test runner
run: |
cd babel-test262-runner
npm ci
node lib/download-node
- name: Download test262
run: make bootstrap-test262
- name: Download chunks file
uses: actions/download-artifact@v3
with:
name: test262-chunks
- name: Run test262
run: |
cd babel-test262-runner
node lib/run-tests I_AM_SURE | tee ~/test262-${{ matrix.chunk }}.tap
env:
BABEL_PATH: ".."
TEST262_PATH: ../build/test262
THREADS: 4
CHUNKS_FILE: ../test262-chunks.json
CHUNK: ${{ matrix.chunk }}
- name: Create artifact with report results
uses: actions/upload-artifact@v3
with:
name: test262-result-${{ matrix.chunk }}
path: ~/test262-${{ matrix.chunk }}.tap
retention-days: 3

test262-finish:
name: test262 - Analyze results
runs-on: ubuntu-latest
needs: test262
steps:
- uses: actions/download-artifact@v3
with: { name: test262-result-0 }
- uses: actions/download-artifact@v3
with: { name: test262-result-1 }
- uses: actions/download-artifact@v3
with: { name: test262-result-2 }
- uses: actions/download-artifact@v3
with: { name: test262-result-3 }
- uses: actions/download-artifact@v3
with: { name: test262-result-4 }
- uses: actions/download-artifact@v3
with: { name: test262-result-5 }
- uses: actions/download-artifact@v3
with: { name: test262-result-6 }
- uses: actions/download-artifact@v3
with: { name: test262-result-7 }
- name: Merge chunk results
run: |
cat test262-0.tap test262-1.tap test262-2.tap test262-3.tap \
test262-4.tap test262-5.tap test262-6.tap test262-7.tap \
| npx tap-merge > test262.tap
- name: Create artifact with report results
uses: actions/upload-artifact@v3
with:
name: test262-result
path: test262.tap
- name: Checkout test runner
uses: actions/checkout@v3
with:
repository: babel/babel-test262-runner
path: babel-test262-runner
# - name: Download previous results
# run: |
# cd babel-test262-runner
# npm ci
# node lib/download-main-artifact/index.mjs ~/test262-main.tap
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Compare previous main branch & current results
# run: |
# cd babel-test262-runner
# node lib/compare-results ~/test262-main.tap ~/test262.tap | tee ~/diff.tap
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -178,7 +178,7 @@ bootstrap-test262:
rm -rf build/test262
mkdir -p build
git clone --filter=blob:none --sparse --single-branch --shallow-since=2021-05-01 https://github.com/tc39/test262.git build/test262
cd build/test262 && git sparse-checkout set "test"
cd build/test262 && git sparse-checkout set "test" "harness"
cd build/test262 && git checkout -q $(TEST262_COMMIT)

test-test262:
Expand Down

0 comments on commit 367d4ed

Please sign in to comment.