Skip to content

Commit 7856238

Browse files
committed
Add GH CI setup
1 parent d240e6c commit 7856238

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/ci.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v3
22+
with:
23+
distribution: 'adopt'
24+
java-version: '17'
25+
26+
- name: Cache Maven packages
27+
uses: actions/cache@v3
28+
with:
29+
path: ~/.m2/repository
30+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
31+
restore-keys: ${{ runner.os }}-maven
32+
33+
- name: Cache Docker layers
34+
uses: actions/cache@v3
35+
with:
36+
path: /var/lib/docker
37+
key: ${{ runner.os }}-docker-${{ hashFiles('Dockerfile') }}
38+
restore-keys: |
39+
${{ runner.os }}-docker-
40+
41+
- name: Build with Maven
42+
run: mvn clean install --fail-at-end
43+
44+
- name: Run Unit Tests
45+
run: mvn test
46+
47+
- name: Run Integration Tests
48+
run: mvn verify

0 commit comments

Comments
 (0)