Skip to content

Commit 11014ad

Browse files
authored
Merge pull request #5 from railsware/added-ci-to-run-tests
Create CI to run tests
2 parents 1cbbdc9 + 8daa461 commit 11014ad

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/maven.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Java CI with Maven
10+
11+
on: push
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
java-version: [17]
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set up JDK ${{ matrix.java-version }}
27+
uses: actions/setup-java@v4
28+
with:
29+
java-version: ${{ matrix.java-version }}
30+
distribution: 'temurin'
31+
32+
- name: Cache Maven packages
33+
uses: actions/cache@v4
34+
with:
35+
path: ~/.m2
36+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
37+
restore-keys: |
38+
${{ runner.os }}-m2-
39+
40+
- name: Install dependencies and run tests
41+
run: mvn clean install -B -q

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,14 @@
105105

106106
</dependencies>
107107

108+
<build>
109+
<plugins>
110+
<plugin>
111+
<groupId>org.apache.maven.plugins</groupId>
112+
<artifactId>maven-surefire-plugin</artifactId>
113+
<version>3.2.5</version>
114+
</plugin>
115+
</plugins>
116+
</build>
117+
108118
</project>

0 commit comments

Comments
 (0)