-
Notifications
You must be signed in to change notification settings - Fork 14
44 lines (42 loc) · 1.11 KB
/
build.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
name: build & test
on:
push:
branches: [master]
pull_request:
types: [opened, reopened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
jdk-version: [ 8, 11 ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v2
with:
java-version: "${{ matrix.jdk-version }}"
distribution: adopt
- name: Verify java installed properly
run: java -version
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# test
- name: Test
run: |-
export TERM=${TERM:-dumb}
./gradlew test
# test build
- name: Build with Gradle
run: ./gradlew build
- name: Save test results
if: always()
run: |-
mkdir -p ~/junit
find . -type f -regex "./build/test-results/test/.*xml" -exec cp {} ~/junit/ \;
- uses: actions/upload-artifact@v4
if: always()
with:
name: test_library_jdk${{ matrix.jdk-version }}_junit
path: "~/junit"
retention-days: 7