Skip to content

Commit cc14aa3

Browse files
authored
Merge pull request #18 from xebia-functional/17-github-actions-for-running-spotless-and-tests
GitHub actions for running spotless and tests
2 parents 0cd4254 + 520434f commit cc14aa3

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

.github/workflows/ci.yml

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

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ out/
3333
/.nb-gradle/
3434

3535
### VS Code ###
36-
.vscode/
36+
.vscode/
37+
.DS_Store

0 commit comments

Comments
 (0)