-
Notifications
You must be signed in to change notification settings - Fork 10
54 lines (44 loc) · 1.18 KB
/
test.yml
File metadata and controls
54 lines (44 loc) · 1.18 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
name: Run Tests
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build project
run: ./gradlew assemble --no-daemon
env:
GRADLE_OPTS: -Xmx2g -Dorg.gradle.daemon=false
- name: Run unit tests
run: ./gradlew test --continue --no-daemon
env:
GRADLE_OPTS: -Xmx2g -Dorg.gradle.daemon=false
- name: Verify JARs built
run: |
ls -la pnnl.goss.core/generated/*.jar
echo "Build and tests successful"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v6
with:
name: test-results
path: |
**/generated/test-reports/
**/generated/reports/
retention-days: 30