-
Notifications
You must be signed in to change notification settings - Fork 27
41 lines (32 loc) · 1.01 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
name: Build Push/PR - Master
on:
push:
branches: [ "master" ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Compile with Maven
run: mvn -B compile --file pom.xml
- name: Test
run: mvn -B test --file pom.xml
- name: Report results to DeepSource
if: ${{ github.event_name != 'pull_request' }}
run: |
# Install deepsource CLI
curl https://deepsource.io/cli | sh
# From the root directory, run the report coverage command
./bin/deepsource report --analyzer test-coverage --key java --value-file ./target/site/jacoco/jacoco.xml
env:
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}