You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by eo...@apache.org on 2022/02/25 19:07:51 UTC

[curator] branch master updated: CURATOR-624: Fix Github Actions by adding 'distribution' for JDK setup step (#407)

This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/curator.git


The following commit(s) were added to refs/heads/master by this push:
     new 6f7b3e7  CURATOR-624: Fix Github Actions by adding 'distribution' for JDK setup step (#407)
6f7b3e7 is described below

commit 6f7b3e7c79819658516971497d3ce9190de965f6
Author: Martin Grigorov <ma...@users.noreply.github.com>
AuthorDate: Fri Feb 25 21:07:47 2022 +0200

    CURATOR-624: Fix Github Actions by adding 'distribution' for JDK setup step (#407)
---
 .github/workflows/ci-unit-jdk8.yaml                | 49 ----------------------
 .../workflows/{ci-unit-jdk11.yaml => ci-unit.yaml} | 24 ++++++++---
 2 files changed, 19 insertions(+), 54 deletions(-)

diff --git a/.github/workflows/ci-unit-jdk8.yaml b/.github/workflows/ci-unit-jdk8.yaml
deleted file mode 100644
index 06c2655..0000000
--- a/.github/workflows/ci-unit-jdk8.yaml
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-name: CI - Tests JDK 8
-on:
-  push:
-  pull_request:
-    branches:
-      - master
-
-env:
-  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
-
-jobs:
-  check:
-    name:
-    runs-on: ubuntu-latest
-    timeout-minutes: 120
-
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v2
-
-      - name: Set up JDK 1.8
-        uses: actions/setup-java@v2
-        with:
-          java-version: 1.8
-
-      - name: Build
-        run: mvn -B clean install -DskipTests
-
-      - name: Test
-        run: mvn -B verify
diff --git a/.github/workflows/ci-unit-jdk11.yaml b/.github/workflows/ci-unit.yaml
similarity index 70%
rename from .github/workflows/ci-unit-jdk11.yaml
rename to .github/workflows/ci-unit.yaml
index 1ad49ee..d029f48 100644
--- a/.github/workflows/ci-unit-jdk11.yaml
+++ b/.github/workflows/ci-unit.yaml
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-name: CI - Tests JDK 11
+name: CI
 on:
   push:
   pull_request:
@@ -32,18 +32,32 @@ jobs:
     name:
     runs-on: ubuntu-latest
     timeout-minutes: 120
+    strategy:
+      matrix:
+        java:
+        - '8'
+        - '11'
 
     steps:
       - name: Checkout
         uses: actions/checkout@v2
 
-      - name: Set up JDK 11
+      - name: Cache Local Maven Repository
+        uses: actions/cache@v2
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
+
+      - name: Set up JDK ${{ matrix.java }}
         uses: actions/setup-java@v2
         with:
-          java-version: 11
+          java-version: ${{ matrix.java }}
+          distribution: 'temurin'
 
-      - name: Build
+      - name: Build with ${{ matrix.java }}
         run: mvn -B clean install -DskipTests
 
-      - name: Test
+      - name: Test with ${{ matrix.java }}
         run: mvn -B verify