From 8ef0a4c62ffab3829cb658a5f2199ecf77e10c15 Mon Sep 17 00:00:00 2001 From: Doehyun Baek Date: Fri, 25 Nov 2022 21:06:07 +0900 Subject: [PATCH] CI: Integrate ESMeta --- .github/workflows/esmeta-test262.yml | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/esmeta-test262.yml diff --git a/.github/workflows/esmeta-test262.yml b/.github/workflows/esmeta-test262.yml new file mode 100644 index 0000000000..aa1d1a050b --- /dev/null +++ b/.github/workflows/esmeta-test262.yml @@ -0,0 +1,41 @@ +name: 'esmeta test262' + +on: [pull_request] + +jobs: + esmeta-test262: + name: 'esmeta test262' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup JDK + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17 + - name: Add to PATH + shell: bash + run: | + echo "ESMETA_HOME=$(pwd)/vendor/esmeta" >> $GITHUB_ENV + - name: download esmeta + run: | + mkdir -p "${ESMETA_HOME}" + git clone --branch v0.1.0-rc8 --depth 1 https://github.com/es-meta/esmeta.git "${ESMETA_HOME}" + cd "${ESMETA_HOME}" && git submodule update --init --depth 1 + - name: build esmeta + run: | + cd "${ESMETA_HOME}" + sbt assembly + - name: run test262 + run: | + git fetch origin main + paths=$(git diff --diff-filter ACMR --name-only origin/main.. -- test/) + if [ "$paths" == "" ]; then + echo No test files added or modified. Exiting. + exit 0 + fi + echo New or modified test files: + echo "$paths" + "${ESMETA_HOME}"/bin/esmeta test262-test -status -test262dir=$(pwd) $paths + \ No newline at end of file