Merge pull request #662 from asciidoctor/development-4.x #309
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: zulu | |
# Licensing | |
- name: Licensing | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --console=plain -S license | |
# Coding style | |
- name: Coding style | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --console=plain -S codenarcAll | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v1 | |
# use a short path to avoid exceeding the path limit on Windows... sigh | |
with: | |
path: 'w' | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: zulu | |
- name: Cache offline repository | |
uses: actions/cache@v3 | |
with: | |
path: testfixtures/offline-repo/build/repo | |
key: ${{ runner.os }}-offline-repo-${{ hashFiles('module-versions.properties') }} | |
restore-keys: ${{ runner.os }}-offline-repo- | |
# Build | |
- name: Build offline repository | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories | |
- name: Build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --console=plain --warning-mode=all -s clean assemble | |
# Test | |
# TODO: Resolve the gem integration test issue. See https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/694 | |
- name: Test | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --console=plain --warning-mode=all -s check --no-parallel -Djava.net.preferIPv4Stack=true -x gradleTest -x :asciidoctor-gradle-jvm-gems:IntTest --scan | |
# Stop gradlew to avoid locking issues | |
- name: Cleanup | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --stop | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
java: [ 8 ] | |
# os: [ubuntu-latest, macos-latest] | |
# java: [ 8, 11 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: zulu | |
- name: Cache offline repository | |
uses: actions/cache@v3 | |
with: | |
path: testfixtures/offline-repo/build/repo | |
key: ${{ runner.os }}-offline-repo-${{ hashFiles('module-versions.properties') }} | |
restore-keys: ${{ runner.os }}-offline-repo- | |
- name: Build offline repository | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories | |
# Build | |
- name: Build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: -i -S --console=plain --no-build-cache assemble | |
# Integration tests | |
- name: Integration tests (without slides) | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: -i -s --console=plain --no-build-cache test intTest remoteTest --scan | |
# arguments: -i -s --console=plain --no-build-cache test intTest remoteTest -x asciidoctor-gradle-jvm-slides:intTest | |
# arguments: -i -s --console=plain --no-build-cache test intTest remoteTest -x asciidoctor-gradle-slides-export:intTest -x asciidoctor-gradle-jvm-slides:intTest | |
# TODO: See https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/695 | |
# - name: Integration tests (slides only) | |
# uses: eskatos/gradle-command-action@v2 | |
# with: | |
# arguments: -i -s --console=plain --no-build-cache test asciidoctor-gradle-jvm-slides:intTest asciidoctor-gradle-slides-export:intTest | |
# Gradle tests | |
- name: Gradle tests | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: -i -s --console=plain --no-build-cache gradleTest --scan |