mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 18:36:46 +00:00
stabilize the cache on the Windows in e2e test
This commit is contained in:
parent
1872d8ed8c
commit
313e1ad891
1 changed files with 4 additions and 18 deletions
22
.github/workflows/e2e-cache.yml
vendored
22
.github/workflows/e2e-cache.yml
vendored
|
@ -32,9 +32,10 @@ jobs:
|
|||
java-version: '11'
|
||||
cache: 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: |
|
||||
cp __tests__/cache/gradle/build.gradle .
|
||||
gradle downloadDependencies
|
||||
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle
|
||||
if [ ! -d ~/.gradle/caches ]; then
|
||||
echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
|
||||
exit 1
|
||||
|
@ -49,13 +50,6 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Create build.gradle
|
||||
run: |
|
||||
cp __tests__/cache/gradle/build.gradle .
|
||||
if [ -d ~/.gradle/caches ]; then
|
||||
echo "::error::The ~/.gradle/caches directory exists unexpectedly"
|
||||
exit 1
|
||||
fi
|
||||
- name: Run setup-java with the cache for gradle
|
||||
uses: ./
|
||||
id: setup-java
|
||||
|
@ -88,8 +82,7 @@ jobs:
|
|||
cache: maven
|
||||
- name: Create files to cache
|
||||
run: |
|
||||
cp __tests__/cache/maven/pom.xml .
|
||||
mvn verify
|
||||
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
|
||||
|
@ -104,13 +97,6 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Create pom.xml
|
||||
run: |
|
||||
cp __tests__/cache/maven/pom.xml .
|
||||
if [ -d ~/.m2/repository ]; then
|
||||
echo "::error::The ~/.m2/repository directory exists unexpectedly"
|
||||
exit 1
|
||||
fi
|
||||
- name: Run setup-java with the cache for maven
|
||||
uses: ./
|
||||
id: setup-java
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue