-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (45 loc) · 1.14 KB
/
ci.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
44
45
46
47
48
49
name: ci
on:
push:
branches:
- '**'
pull_request:
types: [ assigned ]
env:
OSSRH_USERNAME: 'OSSRH_USERNAME'
OSSRH_PASSWORD: 'OSSRH_PASSWORD'
jobs:
unit-test:
name: Unit Test
runs-on: ubuntu-latest
timeout-minutes: 3
strategy:
matrix:
java: [ '8', '11', '17', '18' ]
steps:
- name: 'Cancel previous runs'
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: 'Checkout repository'
uses: actions/checkout@v3
- uses: ./.github/actions/set-up-jdk
with:
jdk-version: '${{ matrix.java }}'
- name: 'Run test'
run: ./gradlew clean test
sonarqube:
name: Sonarqube Report
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/set-up-jdk
with:
jdk-version: '11'
- uses: ./.github/actions/sonarqube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}