-
Notifications
You must be signed in to change notification settings - Fork 14
54 lines (51 loc) · 1.67 KB
/
quality.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
50
51
52
53
54
name: 'Quality analysis'
on:
push:
branches:
- master
- release
paths-ignore:
- '*.md'
pull_request:
paths-ignore:
- '*.md'
schedule:
- cron: '42 16 * * 4'
env:
MVN_CMD: "./mvnw --settings .cicd.settings.xml -e -B -V"
jobs:
code-analysis:
runs-on: ubuntu-22.04
env:
COVERALLS_REPO_TOKEN_EXISTS: ${{ secrets.COVERALLS_REPO_TOKEN != '' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 8
# build with JDK 8 because of issue https://github.com/trautonen/coveralls-maven-plugin/issues/112
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 8
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: 'java'
- name: Build and test with Maven
run: $MVN_CMD install
- name: upload test results
uses: actions/upload-artifact@v3 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
path: '**/target/*-reports/TEST-*.xml'
- name: Execute Maven coveralls Plugin
if: ${{ env.COVERALLS_REPO_TOKEN_EXISTS == 'true' }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_EVENT_PATH: ${{ github.event_path }}
run: $MVN_CMD coveralls:report -DrepoToken=$COVERALLS_REPO_TOKEN -DserviceName=GitHub-Actions
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2