Skip to content

Commit 8d6f287

Browse files
authored
feat: Run build on different platforms (#57)
1 parent 4c31df4 commit 8d6f287

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

.github/workflows/build.yml

+21-7
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,46 @@ on:
1919
workflow_dispatch:
2020

2121
jobs:
22-
java-17:
23-
runs-on: ubuntu-latest
22+
mvn-install:
23+
strategy:
24+
matrix:
25+
java: [17]
26+
os: [ubuntu-latest, windows-latest]
27+
include:
28+
- os: ubuntu-latest
29+
java: 17
30+
upload-dependency-graph: true
31+
run-sonarcloud: true
32+
run-coveralls: true
33+
34+
runs-on: ${{ matrix.os }}
2435

2536
steps:
2637
- name: Checkout
2738
uses: actions/checkout@v3
28-
- name: Set up JDK 17
39+
- name: Set up JDK ${{ matrix.java }}
2940
uses: actions/setup-java@v3
3041
with:
31-
java-version: "17"
42+
java-version: ${{ matrix.java }}
3243
distribution: "temurin"
3344
cache: maven
3445
- name: Build with Maven
3546
run: mvn install
3647

3748
# Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
38-
- name: Update dependency graph
49+
- if: ${{ matrix.upload-dependency-graph }}
50+
name: Update dependency graph
3951
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
4052

41-
- name: SonarCloud
53+
- if: ${{ matrix.run-sonarcloud }}
54+
name: SonarCloud
4255
env:
4356
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4457
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4558
run: mvn sonar:sonar -P sonarcloud
4659

47-
- name: Coveralls
60+
- if: ${{ matrix.run-coveralls }}
61+
name: Coveralls
4862
uses: coverallsapp/github-action@v2
4963
with:
5064
# *base-path* is prepended to all paths in order to correctly reference source files on coveralls.io

0 commit comments

Comments
 (0)