-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (127 loc) · 5.26 KB
/
gradle-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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: JavaCI-PR
on:
push:
branches: [ main]
pull_request:
branches: [ main ]
paths-ignore:
- 'README.md'
- '**/README.md'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'pull_request_template.md'
- '.lift/.toml'
- '**/.lift/.toml'
- 'SECURITY.md'
- 'LICENSE'
- '.github/ISSUE_TEMPLATE/**'
- '.github/assets/**'
- '.github/workflows/**'
- '!.github/workflows/gradle-ci.yml'
- '.github/pr-labeler.yml'
- 'renovate.json'
- '.whitesource'
- 'config/ossindex/exclusions.txt'
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
# Set up build environment
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
distribution: temurin
java-version: 17
- name: Decode key (if Ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
mkdir -p ${{ runner.temp }}/.gnupg/
echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | base64 --decode > ${{ runner.temp }}/.gnupg/secring.gpg
- name: Set up Gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
with:
cache-disabled: true
- name: Build with Gradle (if Ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: >
./gradlew printVersion build sign
-Psigning.keyId=${{ secrets.SIGNING_KEY_ID }}
-Psigning.password=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
-Psigning.secretKeyRingFile=${{ runner.temp }}/.gnupg/secring.gpg
- name: Build with Gradle (if Windows)
if: ${{ matrix.os != 'ubuntu-latest' }}
run: ./gradlew printVersion build
- name: Clean-up GPG key (if Ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
rm -rf ${{ runner.temp }}/.gnupg/
- name: Upload Test reports - All
if: always()
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: test-report-abort-mission-${{ matrix.os }}
path: |
mission-control/build/reports/tests/test
boosters/**/build/reports/tests/test
mission-report/**/build/reports/tests/test
retention-days: 5
- name: Upload coverage to Codecov - Core
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./mission-control/build/reports/jacoco/report.xml
flags: core
- name: Upload coverage to Codecov - Boosters - JUnit4
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./boosters/booster-junit4/build/reports/jacoco/report.xml
flags: junit4
- name: Upload coverage to Codecov - Boosters - Jupiter
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./boosters/booster-junit-jupiter/build/reports/jacoco/report.xml
flags: jupiter
- name: Upload coverage to Codecov - Boosters - TestNG
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./boosters/booster-testng/build/reports/jacoco/report.xml
flags: testng
- name: Upload coverage to Codecov - Boosters - Cucumber JVM
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./boosters/booster-cucumber-jvm/build/reports/jacoco/report.xml
flags: cucumber
- name: Upload coverage to Codecov - Boosters - Testkit
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./boosters/testkit/build/reports/jacoco/report.xml
flags: testkit
- name: Upload coverage to Codecov - Reporting - Flight Evaluation Report
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./mission-report/flight-evaluation-report/build/reports/jacoco/report.xml,./mission-report/flight-evaluation-report/node/build/coverage/cobertura-coverage.xml
flags: flighteval