-
Notifications
You must be signed in to change notification settings - Fork 12
65 lines (56 loc) · 1.8 KB
/
ci.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
name: Build and Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '11', '15', '17', '21' ]
name: Java ${{ matrix.Java }}
steps:
- uses: actions/checkout@v2
- name: Setup java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build and Test with Gradle
run: ./gradlew clean build javadoc
- name: Upload Unit Test Results And Specification
if: always()
uses: actions/upload-artifact@v2
with:
name: reports-java-${{ matrix.java }}
path: |
build/test-results/**/*.xml
build/reports/spec/
publish-test-results:
name: "Publish Test Results and Specifications"
needs: build-and-test
runs-on: ubuntu-latest
# the build-and-test job might be skipped, we don't need to run this job then
if: success() || failure()
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: artifacts/**/test-results/**/*.xml
- name: Publish Specifications
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: concordion/concordion-specifications
publish_branch: main
publish_dir: artifacts/reports-java-21/reports/spec
destination_dir: concordion-excel-extension