Commit fa513641 authored by Mario Schünadel's avatar Mario Schünadel
Browse files

Merge remote-tracking branch '[email protected]/setup-java.git/main' into...

Merge remote-tracking branch '[email protected]/setup-java.git/main' into include-buildSrc-in-cache-key
parents ca584e70 055250a1
Loading
Loading
Loading
Loading
+4 −4
Changes for .github/workflows/build.yml: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -19,11 +19,11 @@ jobs:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
    steps:
      - uses: actions/checkout@v2
      - name: Setup Node.JS 12
        uses: actions/setup-node@v2
      - uses: actions/checkout@v3
      - name: Setup Node.JS 16
        uses: actions/setup-node@v3
        with:
          node-version: 12.x
          node-version: 16.x
          cache: npm
      - run: npm ci
      - run: npm run build
+6 −5
Changes for .github/workflows/check-dist.yml: 6 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -21,12 +21,13 @@ jobs:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - uses: actions/checkout@v3

      - name: Set Node.js 12.x
        uses: actions/setup-node@v1
      - name: Set Node.js 16.x
        uses: actions/setup-node@v3
        with:
          node-version: 12.x
          node-version: 16.x
          cache: npm

      - name: Install dependencies
        run: npm ci
@@ -44,7 +45,7 @@ jobs:
        id: diff

      # If index.js was different than expected, upload the expected version as an artifact
      - uses: actions/upload-artifact@v2
      - uses: actions/upload-artifact@v3
        if: ${{ failure() && steps.diff.conclusion == 'failure' }}
        with:
          name: dist
+100 −4
Changes for .github/workflows/e2e-cache.yml: 100 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ jobs:
        os: [macos-latest, windows-latest, ubuntu-latest]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        uses: actions/checkout@v3
      - name: Run setup-java with the cache for gradle
        uses: ./
        id: setup-java
@@ -49,7 +49,7 @@ jobs:
    needs: gradle-save
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        uses: actions/checkout@v3
      - name: Run setup-java with the cache for gradle
        uses: ./
        id: setup-java
@@ -72,7 +72,7 @@ jobs:
        os: [macos-latest, windows-latest, ubuntu-latest]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        uses: actions/checkout@v3
      - name: Run setup-java with the cache for maven
        uses: ./
        id: setup-java
@@ -96,7 +96,7 @@ jobs:
    needs: maven-save
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        uses: actions/checkout@v3
      - name: Run setup-java with the cache for maven
        uses: ./
        id: setup-java
@@ -111,3 +111,99 @@ jobs:
            exit 1
          fi
          ls ~/.m2/repository
  sbt-save:
    runs-on: ${{ matrix.os }}
    defaults:
      run:
        shell: bash
        working-directory: __tests__/cache/sbt
    strategy:
      fail-fast: false
      matrix:
        os: [macos-latest, windows-latest, ubuntu-latest]
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Run setup-java with the cache for sbt
        uses: ./
        id: setup-java
        with:
          distribution: 'adopt'
          java-version: '11'
          cache: sbt
      - name: Create files to cache
        run: sbt update

      - name: Check files to cache on macos-latest
        if: matrix.os == 'macos-latest'
        run: |
          if [ ! -d ~/Library/Caches/Coursier ]; then
            echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
            exit 1
          fi

      - name: Check files to cache on windows-latest
        if: matrix.os == 'windows-latest'
        run: |
          if [ ! -d ~/AppData/Local/Coursier/Cache ]; then
            echo "::error::The ~/AppData/Local/Coursier/Cache directory does not exist unexpectedly"
            exit 1
          fi

      
      - name: Check files to cache on ubuntu-latest
        if: matrix.os == 'ubuntu-latest'
        run: |
          if [ ! -d ~/.cache/coursier ]; then
            echo "::error::The ~/.cache/coursier directory does not exist unexpectedly"
            exit 1
          fi

  sbt-restore:
    runs-on: ${{ matrix.os }}
    defaults:
      run:
        shell: bash
        working-directory: __tests__/cache/sbt
    strategy:
      fail-fast: false
      matrix:
        os: [macos-latest, windows-latest, ubuntu-latest]
    needs: sbt-save
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Run setup-java with the cache for sbt
        uses: ./
        id: setup-java
        with:
          distribution: 'adopt'
          java-version: '11'
          cache: sbt

      - name: Confirm that ~/Library/Caches/Coursier directory has been made
        if: matrix.os == 'macos-latest'
        run: |
          if [ ! -d ~/Library/Caches/Coursier ]; then
            echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
            exit 1
          fi
          ls ~/Library/Caches/Coursier

      - name: Confirm that ~/AppData/Local/Coursier/Cache directory has been made
        if: matrix.os == 'windows-latest'
        run: |
          if [ ! -d ~/AppData/Local/Coursier/Cache ]; then
            echo "::error::The ~/AppData/Local/Coursier/Cache directory does not exist unexpectedly"
            exit 1
          fi
          ls ~/AppData/Local/Coursier/Cache

      - name: Confirm that ~/.cache/coursier directory has been made
        if: matrix.os == 'ubuntu-latest'
        run: |
          if [ ! -d ~/.cache/coursier ]; then
            echo "::error::The ~/.cache/coursier directory does not exist unexpectedly"
            exit 1
          fi
          ls ~/.cache/coursier
+3 −3
Changes for .github/workflows/e2e-local-file.yml: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ jobs:
        os: [macos-latest, windows-latest, ubuntu-latest]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        uses: actions/checkout@v3
      - name: Download Adopt OpenJDK file
        run: |
          if ($IsLinux) {
@@ -57,7 +57,7 @@ jobs:
        os: [macos-latest, windows-latest, ubuntu-latest]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        uses: actions/checkout@v3
      - name: Download Zulu OpenJDK file
        run: |
          if ($IsLinux) {
@@ -94,7 +94,7 @@ jobs:
        os: [macos-latest, windows-latest, ubuntu-latest]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        uses: actions/checkout@v3
      - name: Download Eclipse Temurin file
        run: |
          if ($IsLinux) {
+4 −4
Changes for .github/workflows/e2e-publishing.yml: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ jobs:
        os: [macos-latest, windows-latest, ubuntu-latest]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        uses: actions/checkout@v3
      - name: setup-java
        uses: ./
        id: setup-java
@@ -59,7 +59,7 @@ jobs:
        os: [macos-latest, windows-latest, ubuntu-latest]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        uses: actions/checkout@v3
      - name: Create fake settings.xml
        run: |
          $xmlDirectory = Join-Path $HOME ".m2"
@@ -95,7 +95,7 @@ jobs:
        os: [macos-latest, windows-latest, ubuntu-latest]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        uses: actions/checkout@v3
      - name: Create fake settings.xml
        run: |
          $xmlDirectory = Join-Path $HOME ".m2"
@@ -132,7 +132,7 @@ jobs:
        os: [macos-latest, windows-latest, ubuntu-latest]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        uses: actions/checkout@v3
      - name: setup-java
        uses: ./
        id: setup-java
Loading