Skip to content

Commit a2bfa55

Browse files
committed
Added a GitHub action for checking the build process (using maven clean test) on each push/pull request to the "main" branch.
1 parent 5f933ad commit a2bfa55

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build project
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# Checkout repo using https://github.com/marketplace/actions/checkout
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Set up JDK 1.8
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 1.8
21+
22+
# See: https://github.com/actions/cache/blob/master/examples.md#java---maven
23+
- name: Maven cache and restore deps
24+
uses: actions/cache@v1
25+
with:
26+
path: ~/.m2/repository
27+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: |
29+
${{ runner.os }}-maven-
30+
- name: Build with Maven
31+
run: mvn clean test -B -U

0 commit comments

Comments
 (0)