forked from CharlesSkelton/studio
-
Notifications
You must be signed in to change notification settings - Fork 7
90 lines (75 loc) · 2.41 KB
/
gradle.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
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest] # Specify OS for the matrix
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 9
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle
run: ./gradlew build installDist
timeout-minutes: 2
- name: Integration tests - Linux
if: ${{ runner.os == 'Linux' }}
run: ./intTests-Xvfb.sh
timeout-minutes: 5
# - name: Integration tests - Windows
# if: ${{ runner.os == 'Windows' }}
# run: ./gradlew integrationTest -x test
# timeout-minutes: 5
- name: Log files - Linux
if: ${{ runner.os == 'Linux' }}
run: find . -type f -exec echo {} \;
- name: Log files - Windows
if: ${{ runner.os == 'Windows' }}
run: Get-ChildItem -Path . -Recurse -File
- name: Upload Failed test screenshots
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: Failed tests
path: ./failed-gui-tests/
- name: Report
uses: dorny/test-reporter@v1
if: always()
with:
name: JUnit Tests - ${{ runner.os }}
path: build/test-results/*/*.xml
reporter: java-junit
fail-on-error: true
- name: Upload reports in case of failure
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: Failed Reports - ${{ runner.os }}
path: ./build/reports/tests/
- name: Upload Windows distribution
if: ${{ runner.os == 'Windows' }}
uses: actions/upload-artifact@v4
with:
name: Windows distribution
path: ./build/install