From b0b21485b0ad5fa70c7749e08977a812ba362b43 Mon Sep 17 00:00:00 2001 From: Stewart Bryson Date: Thu, 18 Aug 2022 16:06:10 -0400 Subject: [PATCH] publish docs and tests. --- .github/workflows/gradle-pr.yml | 12 +++++------- .github/workflows/gradle-publish.yml | 12 +++++------- build.gradle | 3 --- plugin/build.gradle | 24 ++++++++++++++++++++++++ 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/.github/workflows/gradle-pr.yml b/.github/workflows/gradle-pr.yml index 0f5dcfc..c548f74 100644 --- a/.github/workflows/gradle-pr.yml +++ b/.github/workflows/gradle-pr.yml @@ -22,12 +22,10 @@ jobs: - name: Gradle build and test uses: gradle/gradle-build-action@v2 with: - arguments: build functionalTest buildDashboard + arguments: build validatePlugin functionalTest buildDashboard - - name: Upload build reports - uses: actions/upload-artifact@v3 + - name: Publish tests + uses: mikepenz/action-junit-report@v3 + if: always() with: - name: build-reports - path: | - build/reports/buildDashboard/ - plugin/build/reports/ \ No newline at end of file + report_paths: '**/build/test-results/**/TEST-*.xml' \ No newline at end of file diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml index deeb4d0..8d56814 100644 --- a/.github/workflows/gradle-publish.yml +++ b/.github/workflows/gradle-publish.yml @@ -33,12 +33,10 @@ jobs: - name: Gradle publish uses: gradle/gradle-build-action@v2 with: - arguments: build publish groovydoc githubRelease buildDashboard -PgithubToken=${{secrets.GITHUB_TOKEN}} + arguments: build publish githubRelease publishDocs buildDashboard -PgithubToken=${{secrets.GITHUB_TOKEN}} - - name: Upload build reports - uses: actions/upload-artifact@v3 + - name: Publish tests + uses: mikepenz/action-junit-report@v3 + if: always() with: - name: build-reports - path: | - build/reports/buildDashboard/ - plugin/build/reports/ + report_paths: '**/build/test-results/**/TEST-*.xml' diff --git a/build.gradle b/build.gradle index 4477fa6..fb7d50a 100644 --- a/build.gradle +++ b/build.gradle @@ -41,6 +41,3 @@ githubRelease { generateReleaseNotes true //dryRun true } - - - diff --git a/plugin/build.gradle b/plugin/build.gradle index 115e0d2..84d6140 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -4,6 +4,7 @@ plugins { id 'maven-publish' id 'com.adarshr.test-logger' version '3.2.0' id "com.redpillanalytics.gradle-properties" version "1.0.7" + id 'com.fuseanalytics.gradle.s3' version '1.2.0' } dependencies { @@ -83,3 +84,26 @@ publishing { } } } + +s3 { + bucket = 'docs.noumenal.io' +} + +tasks.register("publishLatestDocs", com.fuseanalytics.gradle.s3.S3Upload) { + description = "Publish the latest docs to S3." + keyPrefix = "${rootProject.name}/latest" + sourceDir = tasks.groovydoc.destinationDir + dependsOn groovydoc +} + +tasks.register("publishVersionDocs", com.fuseanalytics.gradle.s3.S3Upload) { + description = "Publish the version docs to S3." + keyPrefix = "${rootProject.name}/$version" + sourceDir = tasks.groovydoc.destinationDir + dependsOn groovydoc +} + +tasks.register("publishDocs") { + dependsOn tasks.publishLatestDocs, tasks.publishVersionDocs + mustRunAfter tasks.publish +}