Skip to content

Merge pull request #28 from concordion/publish-java-21 #20

Merge pull request #28 from concordion/publish-java-21

Merge pull request #28 from concordion/publish-java-21 #20

Workflow file for this run

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