From 9c4de482d84fe0b100039bbe7ded5f55e243d73b Mon Sep 17 00:00:00 2001 From: Jihyeok Park Date: Thu, 6 Feb 2025 12:10:54 +0900 Subject: [PATCH] fix: use setup-java for GitHub actions --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ .github/workflows/e2e.yml | 13 +++++++++++++ .github/workflows/post-submit.yml | 13 +++++++++++++ 3 files changed, 46 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d234bf2a7..9068a3b6b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,16 @@ jobs: with: submodules: true + - name: Setup JDK + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: sbt + + - name: Setup SBT + uses: sbt/setup-sbt@v1 + - name: Fetch all tags from ecma262 env: ESMETA_HOME: ${{ github.workspace }} @@ -38,6 +48,16 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Setup JDK + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: sbt + + - name: Setup SBT + uses: sbt/setup-sbt@v1 + - name: Check code format run: sbt formatCheck diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a307a8fc04..7af49ffac3 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -8,10 +8,22 @@ jobs: test: runs-on: ubuntu-latest steps: + - name: Checkout code uses: actions/checkout@v4 with: submodules: true + + - name: Setup JDK + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: sbt + + - name: Setup SBT + uses: sbt/setup-sbt@v1 + - name: Run e2e tests run: | sbt assembly @@ -19,6 +31,7 @@ jobs: npm ci npx playwright install chromium --with-deps npx playwright test --project=chromium + - uses: actions/upload-artifact@v4 if: always() with: diff --git a/.github/workflows/post-submit.yml b/.github/workflows/post-submit.yml index 8a78aed501..bb2d9e65ee 100644 --- a/.github/workflows/post-submit.yml +++ b/.github/workflows/post-submit.yml @@ -7,14 +7,27 @@ jobs: test262test: runs-on: ubuntu-latest steps: + - name: Checkout code uses: actions/checkout@v4 with: submodules: true + + - name: Setup JDK + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: sbt + + - name: Setup SBT + uses: sbt/setup-sbt@v1 + - name: Run test env: ESMETA_HOME: ${{ github.workspace }} run: sbt test262EvalTest + - name: Report Status if: failure() uses: 8398a7/action-slack@v3