Skip to content

Add Process object so as to allow process.env #11628

Add Process object so as to allow process.env

Add Process object so as to allow process.env #11628

Workflow file for this run

name: EcmaScript official test suite (test262)
on:
# SECURITY WARNING: Using `pull_request_target` can be risky!
# It runs workflows with full repo permissions and secrets on code from forks.
# If not handled carefully, malicious PRs can exploit this to steal secrets or manipulate the repo.
#
# Before merging any PR that changes this file, verify that the jobs don't contain
# any commands that could expose credentials or secrets.
#
# GitHub Documentation: <https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target>
pull_request_target:
branches:
- main
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
run_test262:
name: Run the test262 test suite
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
path: boa
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Cache cargo
uses: actions/cache@v5
with:
path: |
target
~/.cargo/git
~/.cargo/registry
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Checkout the data repo
uses: actions/checkout@v6
with:
repository: boa-dev/data
path: data
# Run the test suite.
- name: Run the test262 test suite
run: |
cd boa
mkdir ../results
cargo run --release --bin boa_tester -- run -v -o ../results/test262
cd ..
# Run the results comparison
- name: Compare results
id: compare
shell: bash
run: |
cd boa
comment="$(./target/release/boa_tester compare ../data/test262/refs/heads/main/latest.json ../results/test262/refs/heads/main/latest.json -m)"
echo "comment<<EOF" >> $GITHUB_OUTPUT
echo "$comment" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Get the PR number
id: pr-number
uses: kkak10/pr-number-action@v1.3
- name: Find Previous Comment
uses: peter-evans/find-comment@v4
id: previous-comment
with:
issue-number: ${{ steps.pr-number.outputs.pr }}
body-includes: Test262 conformance changes
- name: Update comment
if: steps.previous-comment.outputs.comment-id
uses: peter-evans/create-or-update-comment@v5
continue-on-error: true
with:
comment-id: ${{ steps.previous-comment.outputs.comment-id }}
body: |
### Test262 conformance changes
${{ steps.compare.outputs.comment }}
edit-mode: replace
- name: Write a new comment
if: ${{ !steps.previous-comment.outputs.comment-id }}
uses: peter-evans/create-or-update-comment@v5
continue-on-error: true
with:
issue-number: ${{ steps.pr-number.outputs.pr }}
body: |
### Test262 conformance changes
${{ steps.compare.outputs.comment }}