-
Notifications
You must be signed in to change notification settings - Fork 4
97 lines (92 loc) · 3.53 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
# 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'
- 'gradle/libs.versions.toml'
- 'config/ossindex/exclusions.txt'
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
steps:
# Set up build environment
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
- name: Build with Gradle
run: ./gradlew printVersion build
- name: Upload Test reports - App
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: test-report-lowkey-vault-app
path: |
lowkey-vault-app/build/reports/tests/test
lowkey-vault-app/build/reports/abort-mission/abort-mission-report.html
retention-days: 5
- name: Upload Test reports - Docker
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: test-report-lowkey-vault-docker
path: |
lowkey-vault-docker/build/reports/cucumber
lowkey-vault-docker/build/reports/abort-mission/abort-mission-report.html
retention-days: 5
- name: Upload Test reports - Testcontainers
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: test-report-lowkey-vault-testcontainers
path: lowkey-vault-testcontainers/build/reports/tests/test
retention-days: 5
- name: Upload coverage to Codecov - App
if: ${{ github.repository_owner == 'nagyesta' }}
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./lowkey-vault-app/build/reports/jacoco/report.xml
flags: app
- name: Upload coverage to Codecov - Client
if: ${{ github.repository_owner == 'nagyesta' }}
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./lowkey-vault-client/build/reports/jacoco/report.xml
flags: client
- name: Upload coverage to Codecov - Testcontainers
if: ${{ github.repository_owner == 'nagyesta' }}
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./lowkey-vault-testcontainers/build/reports/jacoco/report.xml
flags: testcontainers