Skip to content

Commit 0707b73

Browse files
committed
Add Github Action for CI
1 parent ede7c77 commit 0707b73

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: cowtowncoder

.github/workflows/main.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths-ignore:
7+
- "README.md"
8+
- "release-notes/*"
9+
pull_request:
10+
branches:
11+
- master
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
java_version: ['8', '11', '17']
19+
os: ['ubuntu-20.04']
20+
env:
21+
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Set up JDK
25+
uses: actions/setup-java@v3
26+
with:
27+
distribution: "temurin"
28+
java-version: ${{ matrix.java_version }}
29+
cache: 'maven'
30+
- name: Build
31+
run: ./mvnw -B -q -ff -ntp verify
32+
- name: Generate code coverage
33+
if: github.event_name != 'pull_request' && matrix.java_version == '8'
34+
run: ./mvnw -B -q -ff -ntp test
35+
- name: Publish code coverage
36+
if: github.event_name != 'pull_request' && matrix.java_version == '8'
37+
uses: codecov/codecov-action@v2
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
file: ./target/site/jacoco/jacoco.xml
41+
flags: unittests

0 commit comments

Comments
 (0)