Skip to content

Commit f00180e

Browse files
authored
Build/CI: Modernize build.yml (#235)
* Test on more Java versions * Remove travis.yml; unused
1 parent e68d914 commit f00180e

File tree

2 files changed

+22
-32
lines changed

2 files changed

+22
-32
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
11
# 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
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
33

44
name: Java CI with Maven
55

6-
on: [ push, pull_request ]
6+
on:
7+
push:
8+
branches: [ main, master ]
9+
pull_request:
10+
branches: [ main, master ]
711

812
jobs:
913
build:
1014
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
java: [ '8', '11' ]
1119

1220
steps:
13-
- uses: actions/checkout@v2
14-
- name: Set up JDK 8
15-
uses: actions/setup-java@v2
21+
- uses: actions/checkout@v4
22+
- name: Set up JDK ${{ matrix.java }}
23+
uses: actions/setup-java@v4
1624
with:
17-
java-version: '8'
18-
distribution: 'adopt'
25+
java-version: ${{ matrix.java }}
26+
distribution: 'temurin'
1927
cache: maven
2028
- name: Build with Maven
21-
run: mvn --batch-mode --update-snapshots verify
29+
run: mvn --batch-mode --update-snapshots verify
30+
31+
- name: Publish Test Results
32+
if: always()
33+
uses: EnricoMi/publish-unit-test-result-action@v2
34+
with:
35+
files: target/surefire-reports/*.xml

.travis.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)