-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.27 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build wiclax4j
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
- name: Build JAR
run: ./gradlew jar --info --stacktrace --console=plain --build-cache --no-daemon
- name: Run tests
run: ./gradlew test jacocoTestReport --info --stacktrace --console=plain --build-cache --no-daemon
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
continue-on-error: true
with:
files: build/test-results/**/*.xml
- name: Run static analysis
if: github.ref == 'refs/heads/master'
run: ./gradlew sonarqube --info --stacktrace --console=plain --build-cache --no-daemon
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Upload JAR
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
with:
name: wiclax4j
path: build/libs/*.jar