forked from ExpediaGroup/bull
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (105 loc) · 3.24 KB
/
Copy pathgithub-default-actions.yml
File metadata and controls
105 lines (105 loc) · 3.24 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: "Build"
on:
push:
branches-ignore:
- "*-jdk11"
- "*/*-jdk11"
tags-ignore:
- "*"
pull_request:
branches:
- master
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: "Cache Maven repository"
uses: actions/cache@v5.0.5
with:
path: $HOME/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: "JDK set-up"
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
- name: "Build"
run: |
mvn clean install -B -DskipTests -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -P compatibility-mode
test-and-quality-check:
name: "Test and quality check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: "Cache Maven repository"
uses: actions/cache@v5.0.5
with:
path: $HOME/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: "Extract build information"
id: build_info
run: |
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
- name: "JDK set-up"
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
- name: "Test and Quality check"
uses: nick-invision/retry@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SOURCE_BRANCH: ${{ steps.build_info.outputs.SOURCE_BRANCH }}
with:
max_attempts: 10
timeout_minutes: 15
retry_on: error
command: |
mvn verify jacoco:report-aggregate -P compatibility-mode
- name: "Upload coverage baseline"
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v7
with:
name: jacoco-coverage-baseline
path: bull-report/target/site/jacoco-aggregate/jacoco.xml
retention-days: 90
- name: "Submit coverage to Coveralls"
if: ${{ env.COVERALLS_IO_TOKEN != '' }}
env:
COVERALLS_IO_TOKEN: ${{ secrets.COVERALLS_IO_TOKEN }}
run: |
mvn coveralls:report -DrepoToken=$COVERALLS_IO_TOKEN
security-check:
name: "Security check"
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: "Cache Maven repository"
uses: actions/cache@v5.0.5
with:
path: $HOME/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: "JDK set-up"
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
- name: "Checkout repository"
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: "Initialize CodeQL"
uses: github/codeql-action/init@v4
with:
languages: 'java'
- run: |
mvn clean install -B -DskipTests -P fast
- name: "Perform Analysis"
uses: github/codeql-action/analyze@v4