File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - 17-github-actions-for-running-spotless-and-tests
8+ pull_request :
9+ branches :
10+ - main
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v3
19+
20+ - name : Set up JDK 17
21+ uses : actions/setup-java@v3
22+ with :
23+ java-version : ' 17'
24+ distribution : ' corretto'
25+
26+ - name : Cache Kotlin dependencies
27+ uses : actions/cache@v3
28+ with :
29+ path : ~/.gradle/caches
30+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
31+ restore-keys : |
32+ ${{ runner.os }}-gradle-
33+
34+ - name : Cache Gradle wrapper
35+ uses : actions/cache@v3
36+ with :
37+ path : ~/.gradle/wrapper
38+ key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
39+ restore-keys : |
40+ ${{ runner.os }}-gradle-wrapper-
41+
42+ - name : Run spotless and tests
43+ run : ./gradlew spotlessApply test
44+
45+ - name : Run tests
46+ run : ./gradlew test
You can’t perform that action at this time.
0 commit comments