Skip to content

Commit d5dd731

Browse files
authored
Merge pull request #1 from comwrap/actions-test
added action
2 parents 703e37b + a00b965 commit d5dd731

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/maven.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will build a Java project with Maven
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Maven CI
5+
6+
on:
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest]
15+
java: [8, 11]
16+
profile: ['', '-Pclassic']
17+
18+
steps:
19+
# Check out Git repository
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
23+
# Set up environment with Java and Maven
24+
- name: Setup JDK
25+
uses: actions/setup-java@v1
26+
with:
27+
java-version: ${{ matrix.java }}
28+
29+
# Set up dependency cache
30+
- name: Cache local Maven repository
31+
uses: actions/cache@v2
32+
with:
33+
path: ~/.m2/repository
34+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
35+
restore-keys: |
36+
${{ runner.os }}-maven-
37+
# Build & Test
38+
- name: Build & Test with Maven
39+
run: mvn clean install ${{ matrix.profile }}

0 commit comments

Comments
 (0)