mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 10:26:46 +00:00
add e2e for sbt.
This commit is contained in:
parent
4e72968b94
commit
7df480742f
2 changed files with 58 additions and 1 deletions
55
.github/workflows/e2e-cache.yml
vendored
55
.github/workflows/e2e-cache.yml
vendored
|
@ -111,3 +111,58 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
ls ~/.m2/repository
|
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
|
||||||
|
if [ ! -d ~/.ivy2/cache ]; then
|
||||||
|
echo "::error::The ~/.ivy2/cache 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 ~/.ivy2/cache directory has been made
|
||||||
|
run: |
|
||||||
|
if [ ! -d ~/.ivy2/cache ]; then
|
||||||
|
echo "::error::The ~/.ivy2/cache directory does not exist unexpectedly"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ls ~/.ivy2/cache
|
||||||
|
|
2
__tests__/cache/sbt/build.sbt
vendored
2
__tests__/cache/sbt/build.sbt
vendored
|
@ -1 +1,3 @@
|
||||||
ThisBuild / scalaVersion := "3.1.1"
|
ThisBuild / scalaVersion := "3.1.1"
|
||||||
|
|
||||||
|
libraryDependencies += "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % Test
|
Loading…
Add table
Add a link
Reference in a new issue