mirror of
https://gitea.com/actions/setup-java.git
synced 2025-04-06 15:29:37 +00:00
Add SBT in cache managers. (#302)
This commit is contained in:
96
.github/workflows/e2e-cache.yml
vendored
96
.github/workflows/e2e-cache.yml
vendored
@ -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
|
||||
|
Reference in New Issue
Block a user