-
Notifications
You must be signed in to change notification settings - Fork 11
51 lines (43 loc) · 1.21 KB
/
run_tests.yml
File metadata and controls
51 lines (43 loc) · 1.21 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
name: Run Tests
on:
workflow_call:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref || github.ref }}
fetch-depth: 1
# Set up Java for server tests
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'zulu'
cache: 'gradle'
# Grant execute permission for gradlew
- name: Grant execute permission for gradlew
run: chmod +x ./server/gradlew
# Run tests with coverage for server
- name: Run server tests with coverage
working-directory: ./server
run: |
./gradlew test jacocoTestReport
- name: Upload Coverage Report
uses: actions/upload-artifact@v7
if: always()
with:
name: coverage-report
path: server/build/reports/jacoco/test/html/
retention-days: 14
- name: Upload Test Results
uses: actions/upload-artifact@v7
if: always()
with:
name: test-results
path: server/build/reports/tests/test/
retention-days: 14