-
Notifications
You must be signed in to change notification settings - Fork 471
49 lines (45 loc) · 1.5 KB
/
esmeta-test262.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: 'esmeta test262'
on: [pull_request]
jobs:
esmeta-test262:
name: 'esmeta test262'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Setup SBT
uses: sbt/setup-sbt@v1
if: ${{ hashFiles('/usr/bin/sbt') == '' }}
# https://www.peterbe.com/plog/how-to-run-workflow-step-if-a-file-exists
- 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.4.2 --depth 1 https://github.com/es-meta/esmeta.git "${ESMETA_HOME}"
cd "${ESMETA_HOME}" && git submodule update --init --depth 1
- name: build esmeta
working-directory: ${{ env.ESMETA_HOME }}
run: sbt assembly
- name: Identify new or changed tests
id: changed_tests
uses: tj-actions/changed-files@v45
with:
files: test/
- name: run test262
if: steps.changed_tests.outputs.any_changed == 'true'
env:
CHANGED: ${{ steps.changed_tests.outputs.all_changed_files }}
run: |
echo New or modified test files:
for file in $CHANGED; do
echo $file
done
"${ESMETA_HOME}"/bin/esmeta test262-test -status -test262dir=$(pwd) $CHANGED