diff --git a/.github/workflows/e2e-cache-dependency-path.yml b/.github/workflows/e2e-cache-dependency-path.yml
deleted file mode 100644
index 1c79c081..00000000
--- a/.github/workflows/e2e-cache-dependency-path.yml
+++ /dev/null
@@ -1,102 +0,0 @@
-name: Validate cache with cache-dependency-path option
-
-on:
- push:
- branches:
- - main
- - releases/*
- paths-ignore:
- - '**.md'
- pull_request:
- paths-ignore:
- - '**.md'
-
-permissions:
- contents: read
-
-defaults:
- run:
- shell: bash
-
-jobs:
- gradle1-save:
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- os: [macos-latest, windows-latest, ubuntu-latest]
- steps:
- - name: Checkout
- uses: actions/checkout@v7
- with:
- persist-credentials: false
- - name: Run setup-java with the cache for gradle
- uses: ./
- id: setup-java
- with:
- distribution: 'adopt'
- java-version: '17'
- cache: gradle
- cache-dependency-path: __tests__/cache/gradle1/*.gradle*
- - name: Create files to cache
- # Need to avoid using Gradle daemon to stabilize the save process on Windows
- # https://github.com/actions/cache/issues/454#issuecomment-840493935
- run: |
- gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
- if [ ! -d ~/.gradle/caches ]; then
- echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
- exit 1
- fi
- gradle1-restore:
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- os: [macos-latest, windows-latest, ubuntu-latest]
- needs: gradle1-save
- steps:
- - name: Checkout
- uses: actions/checkout@v7
- with:
- persist-credentials: false
- - name: Run setup-java with the cache for gradle
- uses: ./
- id: setup-java
- with:
- distribution: 'adopt'
- java-version: '11'
- cache: gradle
- cache-dependency-path: __tests__/cache/gradle1/*.gradle*
- - name: Confirm that ~/.gradle/caches directory has been made
- run: |
- if [ ! -d ~/.gradle/caches ]; then
- echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
- exit 1
- fi
- ls ~/.gradle/caches/
- gradle2-restore:
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- os: [macos-latest, windows-latest, ubuntu-latest]
- needs: gradle1-save
- steps:
- - name: Checkout
- uses: actions/checkout@v7
- with:
- persist-credentials: false
- - name: Run setup-java with the cache for gradle
- uses: ./
- id: setup-java
- with:
- distribution: 'adopt'
- java-version: '11'
- cache: gradle
- cache-dependency-path: __tests__/cache/gradle2/*.gradle*
- - name: Confirm that ~/.gradle/caches directory has not been made
- run: |
- if [ -d ~/.gradle/caches ]; then
- echo "::error::The ~/.gradle/caches directory exists unexpectedly"
- exit 1
- fi
diff --git a/.github/workflows/e2e-cache.yml b/.github/workflows/e2e-cache.yml
index c76cf50b..07a1c644 100644
--- a/.github/workflows/e2e-cache.yml
+++ b/.github/workflows/e2e-cache.yml
@@ -42,10 +42,7 @@ jobs:
# https://github.com/actions/cache/issues/454#issuecomment-840493935
run: |
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
- if [ ! -d ~/.gradle/caches ]; then
- echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
- exit 1
- fi
+ bash __tests__/check-dir.sh "$HOME/.gradle/caches"
gradle-restore:
runs-on: ${{ matrix.os }}
strategy:
@@ -66,12 +63,7 @@ jobs:
java-version: '11'
cache: gradle
- name: Confirm that ~/.gradle/caches directory has been made
- run: |
- if [ ! -d ~/.gradle/caches ]; then
- echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
- exit 1
- fi
- ls ~/.gradle/caches/
+ run: bash __tests__/check-dir.sh "$HOME/.gradle/caches"
maven-save:
runs-on: ${{ matrix.os }}
strategy:
@@ -93,10 +85,7 @@ jobs:
- name: Create files to cache
run: |
mvn verify -f __tests__/cache/maven/pom.xml
- if [ ! -d ~/.m2/repository ]; then
- echo "::error::The ~/.m2/repository directory does not exist unexpectedly"
- exit 1
- fi
+ bash __tests__/check-dir.sh "$HOME/.m2/repository"
maven-restore:
runs-on: ${{ matrix.os }}
strategy:
@@ -117,12 +106,7 @@ jobs:
java-version: '11'
cache: maven
- name: Confirm that ~/.m2/repository directory has been made
- run: |
- if [ ! -d ~/.m2/repository ]; then
- echo "::error::The ~/.m2/repository directory does not exist unexpectedly"
- exit 1
- fi
- ls ~/.m2/repository
+ run: bash __tests__/check-dir.sh "$HOME/.m2/repository"
sbt-save:
runs-on: ${{ matrix.os }}
defaults:
@@ -155,25 +139,13 @@ jobs:
- name: Check files to cache on macos-latest
if: matrix.os == 'macos-15-intel'
- run: |
- if [ ! -d ~/Library/Caches/Coursier ]; then
- echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
- exit 1
- fi
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier"
- 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
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache"
- 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
+ if: matrix.os == 'ubuntu-22.04'
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier"
sbt-restore:
runs-on: ${{ matrix.os }}
defaults:
@@ -200,25 +172,254 @@ jobs:
- name: Confirm that ~/Library/Caches/Coursier directory has been made
if: matrix.os == 'macos-15-intel'
- 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
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/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
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache"
- name: Confirm that ~/.cache/coursier directory has been made
- if: matrix.os == 'ubuntu-latest'
+ if: matrix.os == 'ubuntu-22.04'
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier"
+ gradle1-save:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [macos-latest, windows-latest, ubuntu-latest]
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - name: Run setup-java with the cache for gradle
+ uses: ./
+ id: setup-java
+ with:
+ distribution: 'adopt'
+ java-version: '17'
+ cache: gradle
+ cache-dependency-path: __tests__/cache/gradle1/*.gradle*
+ - name: Create files to cache
+ # Need to avoid using Gradle daemon to stabilize the save process on Windows
+ # https://github.com/actions/cache/issues/454#issuecomment-840493935
run: |
- if [ ! -d ~/.cache/coursier ]; then
- echo "::error::The ~/.cache/coursier directory does not exist unexpectedly"
- exit 1
- fi
- ls ~/.cache/coursier
+ gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
+ bash __tests__/check-dir.sh "$HOME/.gradle/caches"
+ gradle1-restore:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [macos-latest, windows-latest, ubuntu-latest]
+ needs: gradle1-save
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - name: Run setup-java with the cache for gradle
+ uses: ./
+ id: setup-java
+ with:
+ distribution: 'adopt'
+ java-version: '11'
+ cache: gradle
+ cache-dependency-path: __tests__/cache/gradle1/*.gradle*
+ - name: Confirm that ~/.gradle/caches directory has been made
+ run: bash __tests__/check-dir.sh "$HOME/.gradle/caches"
+ gradle2-restore:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [macos-latest, windows-latest, ubuntu-latest]
+ needs: gradle1-save
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - name: Run setup-java with the cache for gradle
+ uses: ./
+ id: setup-java
+ with:
+ distribution: 'adopt'
+ java-version: '11'
+ cache: gradle
+ cache-dependency-path: __tests__/cache/gradle2/*.gradle*
+ - name: Confirm that ~/.gradle/caches directory has not been made
+ run: bash __tests__/check-dir.sh "$HOME/.gradle/caches" absent
+ maven1-save:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [macos-15-intel, windows-latest, ubuntu-latest]
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - name: Run setup-java with the cache for maven
+ uses: ./
+ id: setup-java
+ with:
+ distribution: 'adopt'
+ java-version: '11'
+ cache: maven
+ cache-dependency-path: __tests__/cache/maven/pom.xml
+ - name: Create files to cache
+ run: |
+ mvn verify -f __tests__/cache/maven/pom.xml
+ bash __tests__/check-dir.sh "$HOME/.m2/repository"
+ maven1-restore:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [macos-15-intel, windows-latest, ubuntu-latest]
+ needs: maven1-save
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - name: Run setup-java with the cache for maven
+ uses: ./
+ id: setup-java
+ with:
+ distribution: 'adopt'
+ java-version: '11'
+ cache: maven
+ cache-dependency-path: __tests__/cache/maven/pom.xml
+ - name: Confirm that ~/.m2/repository directory has been made
+ run: bash __tests__/check-dir.sh "$HOME/.m2/repository"
+ maven2-restore:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [macos-15-intel, windows-latest, ubuntu-latest]
+ needs: maven1-save
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - name: Run setup-java with the cache for maven
+ uses: ./
+ id: setup-java
+ with:
+ distribution: 'adopt'
+ java-version: '11'
+ cache: maven
+ cache-dependency-path: __tests__/cache/maven2/pom.xml
+ - name: Confirm that ~/.m2/repository directory has not been made
+ run: bash __tests__/check-dir.sh "$HOME/.m2/repository" absent
+ sbt1-save:
+ runs-on: ${{ matrix.os }}
+ defaults:
+ run:
+ shell: bash
+ working-directory: __tests__/cache/sbt
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [macos-15-intel, windows-latest, ubuntu-22.04]
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - name: Run setup-java with the cache for sbt
+ uses: ./
+ id: setup-java
+ with:
+ distribution: 'adopt'
+ java-version: '11'
+ cache: sbt
+ cache-dependency-path: __tests__/cache/sbt/*.sbt
+ - name: Setup SBT
+ if: matrix.os == 'macos-15-intel'
+ run: |
+ echo ""Installing SBT...""
+ brew install sbt
+ - name: Create files to cache
+ run: sbt update
+
+ - name: Check files to cache on macos-latest
+ if: matrix.os == 'macos-15-intel'
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier"
+ - name: Check files to cache on windows-latest
+ if: matrix.os == 'windows-latest'
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache"
+ - name: Check files to cache on ubuntu-latest
+ if: matrix.os == 'ubuntu-22.04'
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier"
+ sbt1-restore:
+ runs-on: ${{ matrix.os }}
+ defaults:
+ run:
+ shell: bash
+ working-directory: __tests__/cache/sbt
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [macos-15-intel, windows-latest, ubuntu-22.04]
+ needs: sbt1-save
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - name: Run setup-java with the cache for sbt
+ uses: ./
+ id: setup-java
+ with:
+ distribution: 'adopt'
+ java-version: '11'
+ cache: sbt
+ cache-dependency-path: __tests__/cache/sbt/*.sbt
+
+ - name: Confirm that ~/Library/Caches/Coursier directory has been made
+ if: matrix.os == 'macos-15-intel'
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier"
+ - name: Confirm that ~/AppData/Local/Coursier/Cache directory has been made
+ if: matrix.os == 'windows-latest'
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache"
+ - name: Confirm that ~/.cache/coursier directory has been made
+ if: matrix.os == 'ubuntu-22.04'
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier"
+ sbt2-restore:
+ runs-on: ${{ matrix.os }}
+ defaults:
+ run:
+ shell: bash
+ working-directory: __tests__/cache/sbt2
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [macos-15-intel, windows-latest, ubuntu-22.04]
+ needs: sbt1-save
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - name: Run setup-java with the cache for sbt
+ uses: ./
+ id: setup-java
+ with:
+ distribution: 'adopt'
+ java-version: '11'
+ cache: sbt
+ cache-dependency-path: __tests__/cache/sbt2/*.sbt
+
+ - name: Confirm that ~/Library/Caches/Coursier directory has not been made
+ if: matrix.os == 'macos-15-intel'
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier" absent
+ - name: Confirm that ~/AppData/Local/Coursier/Cache directory has not been made
+ if: matrix.os == 'windows-latest'
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache" absent
+ - name: Confirm that ~/.cache/coursier directory has not been made
+ if: matrix.os == 'ubuntu-22.04'
+ run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier" absent
diff --git a/.github/workflows/e2e-publishing.yml b/.github/workflows/e2e-publishing.yml
index 02a6b259..87316059 100644
--- a/.github/workflows/e2e-publishing.yml
+++ b/.github/workflows/e2e-publishing.yml
@@ -46,13 +46,25 @@ jobs:
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
Get-Content $xmlPath | ForEach-Object { Write-Host $_ }
- [xml]$xml = Get-Content $xmlPath
- $servers = $xml.settings.servers.server
- if (($servers[0].id -ne 'maven') -or ($servers[0].username -ne '${env.MAVEN_USERNAME}') -or ($servers[0].password -ne '${env.MAVEN_CENTRAL_TOKEN}')) {
- throw "Generated XML file is incorrect"
- }
+ $content = [System.IO.File]::ReadAllText($xmlPath)
+ $expected = @(
+ '