-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 1.6 KB
/
backend-ci.yml
File metadata and controls
72 lines (61 loc) · 1.6 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
name: Backend CI
on:
push:
branches: [main]
paths:
- 'backend/**'
- '.github/workflows/backend-ci.yml'
pull_request:
branches: [main]
paths:
- 'backend/**'
- '.github/workflows/backend-ci.yml'
defaults:
run:
working-directory: backend
jobs:
check:
name: Build and test
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
checks: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-tags: true
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 25
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Check formatting
run: ./gradlew spotlessCheck
- name: Build and check
run: ./gradlew check
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v5
with:
files: backend/build/reports/jacoco/test/jacocoTestReport.xml
flags: backend
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: always()
uses: codecov/codecov-action@v5
with:
directory: backend
flags: backend
report_type: test_results
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload generated PDFs
if: always()
uses: actions/upload-artifact@v7
with:
name: generated-pdfs
path: backend/build/test-output/
if-no-files-found: ignore