Skip to content

Merge pull request #732 from asciidoctor/development-4.x #30

Merge pull request #732 from asciidoctor/development-4.x

Merge pull request #732 from asciidoctor/development-4.x #30

Workflow file for this run

name: Build
on:
push:
paths-ignore:
- '*.adoc'
- docs/**
pull_request:
paths-ignore:
- '*.adoc'
- docs/**
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- name: Licensing
run: ./gradlew --console=plain -S license
- name: Coding style
run: ./gradlew --console=plain -S codenarcAll
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- 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
run: ./gradlew --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories
- name: Build
run: ./gradlew --console=plain --warning-mode=all -s clean assemble
# TODO: Resolve the gem integration test issue. See https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/694
- name: Test
run: ./gradlew --console=plain --warning-mode=all -s check --no-parallel -x gradleTest -x :asciidoctor-gradle-jvm-gems:IntTest --scan
env:
JAVA_TOOL_OPTIONS: -Djava.net.preferIPv4Stack=true
# Stop gradlew to avoid locking issues
- name: Cleanup
run: ./gradlew --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@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: zulu
- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- 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
run: ./gradlew --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories
- name: Build
run: ./gradlew -i -S --console=plain --no-build-cache assemble
- name: Integration tests (without slides)
run: ./gradlew -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: ./gradlew -i -s --console=plain --no-build-cache test asciidoctor-gradle-jvm-slides:intTest asciidoctor-gradle-slides-export:intTest
- name: Gradle tests
run: ./gradlew -i -s --console=plain --no-build-cache gradleTest --scan