2323 os : [macos-latest, windows-latest, ubuntu-latest]
2424 steps :
2525 - name : Checkout
26- uses : actions/checkout@v2
26+ uses : actions/checkout@v3
2727 - name : Run setup-java with the cache for gradle
2828 uses : ./
2929 id : setup-java
4949 needs : gradle-save
5050 steps :
5151 - name : Checkout
52- uses : actions/checkout@v2
52+ uses : actions/checkout@v3
5353 - name : Run setup-java with the cache for gradle
5454 uses : ./
5555 id : setup-java
7272 os : [macos-latest, windows-latest, ubuntu-latest]
7373 steps :
7474 - name : Checkout
75- uses : actions/checkout@v2
75+ uses : actions/checkout@v3
7676 - name : Run setup-java with the cache for maven
7777 uses : ./
7878 id : setup-java
9696 needs : maven-save
9797 steps :
9898 - name : Checkout
99- uses : actions/checkout@v2
99+ uses : actions/checkout@v3
100100 - name : Run setup-java with the cache for maven
101101 uses : ./
102102 id : setup-java
@@ -111,3 +111,99 @@ jobs:
111111 exit 1
112112 fi
113113 ls ~/.m2/repository
114+ sbt-save :
115+ runs-on : ${{ matrix.os }}
116+ defaults :
117+ run :
118+ shell : bash
119+ working-directory : __tests__/cache/sbt
120+ strategy :
121+ fail-fast : false
122+ matrix :
123+ os : [macos-latest, windows-latest, ubuntu-latest]
124+ steps :
125+ - name : Checkout
126+ uses : actions/checkout@v3
127+ - name : Run setup-java with the cache for sbt
128+ uses : ./
129+ id : setup-java
130+ with :
131+ distribution : ' adopt'
132+ java-version : ' 11'
133+ cache : sbt
134+ - name : Create files to cache
135+ run : sbt update
136+
137+ - name : Check files to cache on macos-latest
138+ if : matrix.os == 'macos-latest'
139+ run : |
140+ if [ ! -d ~/Library/Caches/Coursier ]; then
141+ echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
142+ exit 1
143+ fi
144+
145+ - name : Check files to cache on windows-latest
146+ if : matrix.os == 'windows-latest'
147+ run : |
148+ if [ ! -d ~/AppData/Local/Coursier/Cache ]; then
149+ echo "::error::The ~/AppData/Local/Coursier/Cache directory does not exist unexpectedly"
150+ exit 1
151+ fi
152+
153+
154+ - name : Check files to cache on ubuntu-latest
155+ if : matrix.os == 'ubuntu-latest'
156+ run : |
157+ if [ ! -d ~/.cache/coursier ]; then
158+ echo "::error::The ~/.cache/coursier directory does not exist unexpectedly"
159+ exit 1
160+ fi
161+
162+ sbt-restore :
163+ runs-on : ${{ matrix.os }}
164+ defaults :
165+ run :
166+ shell : bash
167+ working-directory : __tests__/cache/sbt
168+ strategy :
169+ fail-fast : false
170+ matrix :
171+ os : [macos-latest, windows-latest, ubuntu-latest]
172+ needs : sbt-save
173+ steps :
174+ - name : Checkout
175+ uses : actions/checkout@v3
176+ - name : Run setup-java with the cache for sbt
177+ uses : ./
178+ id : setup-java
179+ with :
180+ distribution : ' adopt'
181+ java-version : ' 11'
182+ cache : sbt
183+
184+ - name : Confirm that ~/Library/Caches/Coursier directory has been made
185+ if : matrix.os == 'macos-latest'
186+ run : |
187+ if [ ! -d ~/Library/Caches/Coursier ]; then
188+ echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
189+ exit 1
190+ fi
191+ ls ~/Library/Caches/Coursier
192+
193+ - name : Confirm that ~/AppData/Local/Coursier/Cache directory has been made
194+ if : matrix.os == 'windows-latest'
195+ run : |
196+ if [ ! -d ~/AppData/Local/Coursier/Cache ]; then
197+ echo "::error::The ~/AppData/Local/Coursier/Cache directory does not exist unexpectedly"
198+ exit 1
199+ fi
200+ ls ~/AppData/Local/Coursier/Cache
201+
202+ - name : Confirm that ~/.cache/coursier directory has been made
203+ if : matrix.os == 'ubuntu-latest'
204+ run : |
205+ if [ ! -d ~/.cache/coursier ]; then
206+ echo "::error::The ~/.cache/coursier directory does not exist unexpectedly"
207+ exit 1
208+ fi
209+ ls ~/.cache/coursier
0 commit comments