Skip to content

Commit

Permalink
Tweak gradle-build-action usages
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Jan 9, 2024
1 parent 20afba2 commit ce6f355
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 49 deletions.
62 changes: 22 additions & 40 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ jobs:
with:
java-version: 11
distribution: zulu
# Licensing
- name: Licensing
uses: gradle/gradle-build-action@v2
- uses: gradle/gradle-build-action@v2
with:
arguments: --console=plain -S license
# Coding style
gradle-home-cache-cleanup: true
- name: Licensing
run: ./gradlew --console=plain -S license
- name: Coding style
uses: gradle/gradle-build-action@v2
with:
arguments: --console=plain -S codenarcAll
run: ./gradlew --console=plain -S codenarcAll
build-windows:
runs-on: windows-latest
steps:
Expand All @@ -27,32 +24,27 @@ jobs:
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-
# Build
- name: Build offline repository
uses: gradle/gradle-build-action@v2
with:
arguments: --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories
run: ./gradlew --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
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
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
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
uses: gradle/gradle-build-action@v2
with:
arguments: --stop
run: ./gradlew --stop
build:
strategy:
matrix:
Expand All @@ -67,35 +59,25 @@ jobs:
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
uses: gradle/gradle-build-action@v2
with:
arguments: --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories
# Build
run: ./gradlew --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: -i -S --console=plain --no-build-cache assemble
# Integration tests
run: ./gradlew -i -S --console=plain --no-build-cache assemble
- name: Integration tests (without slides)
uses: gradle/gradle-build-action@v2
with:
arguments: -i -s --console=plain --no-build-cache test intTest remoteTest --scan
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: 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
# uses: ./gradlew -i -s --console=plain --no-build-cache test asciidoctor-gradle-jvm-slides:intTest asciidoctor-gradle-slides-export:intTest
- name: Gradle tests
uses: gradle/gradle-build-action@v2
with:
arguments: -i -s --console=plain --no-build-cache gradleTest --scan
run: ./gradlew -i -s --console=plain --no-build-cache gradleTest --scan
16 changes: 7 additions & 9 deletions .github/workflows/push-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ jobs:
with:
java-version: 11
distribution: zulu
- name: Combine documentation
uses: gradle/gradle-build-action@v2
- uses: gradle/gradle-build-action@v2
with:
build-root-directory: docs
arguments: --console=plain -q combineDocs
gradle-home-cache-cleanup: true
- run: cd docs
- name: Combine documentation
run: ./gradlew --console=plain -q combineDocs
- name: Publish documentation
uses: gradle/gradle-build-action@v2
with:
build-root-directory: docs
arguments: "--console=plain --info :antora:publishDocs :gh-pages:publishDocs
run: ./gradlew --console=plain --info :antora:publishDocs :gh-pages:publishDocs
-Dorg.ajoberstar.grgit.auth.username=${{ secrets.GITHUB_PUBLISH_USER }}
-Dorg.ajoberstar.grgit.auth.password=${{ secrets.GITHUB_PUBLISH_KEY }}
-Dorg.ajoberstar.grgit.auth.force=hardcoded"
-Dorg.ajoberstar.grgit.auth.force=hardcoded

0 comments on commit ce6f355

Please sign in to comment.