Browse Source

[CI] (Trivial) Update GitHub Actions

Reviewers: anmolnar
Author: ctubbsii
Closes #2216 from ctubbsii/update-ga-v4
Christopher Tubbs 5 months ago
parent
commit
aba99cfa32
3 changed files with 14 additions and 35 deletions
  1. 6 13
      .github/workflows/ci.yaml
  2. 3 10
      .github/workflows/e2e.yaml
  3. 5 12
      .github/workflows/manual.yaml

+ 6 - 13
.github/workflows/ci.yaml

@@ -48,20 +48,13 @@ jobs:
     timeout-minutes: 360
     timeout-minutes: 360
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - name: Set up JDK ${{ matrix.profile.jdk }}
     - name: Set up JDK ${{ matrix.profile.jdk }}
-      uses: actions/setup-java@v3
+      uses: actions/setup-java@v4
       with:
       with:
         java-version: ${{ matrix.profile.jdk }}
         java-version: ${{ matrix.profile.jdk }}
         distribution: temurin
         distribution: temurin
-    - name: Cache local maven repository
-      uses: actions/cache@v3
-      with:
-        path: |
-          ~/.m2/repository/
-          !~/.m2/repository/org/apache/zookeeper
-        key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
-        restore-keys: ${{ runner.os }}-m2
+        cache: 'maven'
     - name: Show the first log message
     - name: Show the first log message
       run: git log -n1
       run: git log -n1
     - name: Install C Dependencies
     - name: Install C Dependencies
@@ -74,21 +67,21 @@ jobs:
         MAVEN_OPTS: -Djansi.force=true
         MAVEN_OPTS: -Djansi.force=true
     - name: Upload unit test results
     - name: Upload unit test results
       if: ${{ failure() }}
       if: ${{ failure() }}
-      uses: actions/upload-artifact@v3
+      uses: actions/upload-artifact@v4
       with:
       with:
         name: surefire-reports-${{ matrix.profile.name }}
         name: surefire-reports-${{ matrix.profile.name }}
         path: ./**/target/surefire-reports/
         path: ./**/target/surefire-reports/
         if-no-files-found: ignore
         if-no-files-found: ignore
     - name: Upload integration test results
     - name: Upload integration test results
       if: ${{ failure() }}
       if: ${{ failure() }}
-      uses: actions/upload-artifact@v3
+      uses: actions/upload-artifact@v4
       with:
       with:
         name: failsafe-reports-${{ matrix.profile.name }}
         name: failsafe-reports-${{ matrix.profile.name }}
         path: ./**/target/failsafe-reports/
         path: ./**/target/failsafe-reports/
         if-no-files-found: ignore
         if-no-files-found: ignore
     - name: Upload cppunit test logs
     - name: Upload cppunit test logs
       if: ${{ failure() }}
       if: ${{ failure() }}
-      uses: actions/upload-artifact@v3
+      uses: actions/upload-artifact@v4
       with:
       with:
         name: cppunit-logs-${{ matrix.profile.name }}
         name: cppunit-logs-${{ matrix.profile.name }}
         path: ./zookeeper-client/zookeeper-client-c/target/c/TEST-*.txt
         path: ./zookeeper-client/zookeeper-client-c/target/c/TEST-*.txt

+ 3 - 10
.github/workflows/e2e.yaml

@@ -31,20 +31,13 @@ jobs:
     timeout-minutes: 360
     timeout-minutes: 360
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
       - name: Set up JDK ${{ matrix.jdk }}
       - name: Set up JDK ${{ matrix.jdk }}
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
         with:
         with:
           java-version: ${{ matrix.jdk }}
           java-version: ${{ matrix.jdk }}
           distribution: temurin
           distribution: temurin
-      - name: Cache local maven repository
-        uses: actions/cache@v3
-        with:
-          path: |
-            ~/.m2/repository/
-            !~/.m2/repository/org/apache/zookeeper
-          key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
-          restore-keys: ${{ runner.os }}-m2
+          cache: 'maven'
       - name: Show the first log message
       - name: Show the first log message
         run: git log -n1
         run: git log -n1
       - name: Install C Dependencies
       - name: Install C Dependencies

+ 5 - 12
.github/workflows/manual.yaml

@@ -43,22 +43,15 @@ jobs:
     timeout-minutes: 360
     timeout-minutes: 360
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
       with:
       with:
         ref: ${{ github.event.inputs.buildRef }}
         ref: ${{ github.event.inputs.buildRef }}
     - name: Set up JDK 11
     - name: Set up JDK 11
-      uses: actions/setup-java@v3
+      uses: actions/setup-java@v4
       with:
       with:
         java-version: 11
         java-version: 11
         distribution: temurin
         distribution: temurin
-    - name: Cache local maven repository
-      uses: actions/cache@v3
-      with:
-        path: |
-          ~/.m2/repository/
-          !~/.m2/repository/org/apache/zookeeper
-        key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
-        restore-keys: ${{ runner.os }}-m2
+        cache: 'maven'
     - name: Show the first log message
     - name: Show the first log message
       run: git log -n1
       run: git log -n1
     - name: Install C Dependencies
     - name: Install C Dependencies
@@ -71,14 +64,14 @@ jobs:
         MAVEN_OPTS: -Djansi.force=true
         MAVEN_OPTS: -Djansi.force=true
     - name: Upload unit test results
     - name: Upload unit test results
       if: ${{ failure() }}
       if: ${{ failure() }}
-      uses: actions/upload-artifact@v3
+      uses: actions/upload-artifact@v4
       with:
       with:
         name: surefire-reports
         name: surefire-reports
         path: ./**/target/surefire-reports/
         path: ./**/target/surefire-reports/
         if-no-files-found: ignore
         if-no-files-found: ignore
     - name: Upload integration test results
     - name: Upload integration test results
       if: ${{ failure() }}
       if: ${{ failure() }}
-      uses: actions/upload-artifact@v3
+      uses: actions/upload-artifact@v4
       with:
       with:
         name: failsafe-reports
         name: failsafe-reports
         path: ./**/target/failsafe-reports/
         path: ./**/target/failsafe-reports/