Skip to content

Commit

Permalink
ci: include running tests in update and publish workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
stempler committed Feb 2, 2024
1 parent 8345a36 commit 5ae15ca
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/publish-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,29 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Create and publish artifacts
run: ./gradlew jars publishJars
- name: Build jars and test
run: |
./gradlew jars publishJarsToMavenLocal :test:test
env:
ORG_GRADLE_PROJECT_wetfArtifactoryUser: ${{ secrets.WETF_ARTIFACTORY_USER }}
ORG_GRADLE_PROJECT_wetfArtifactoryPassword: ${{ secrets.WETF_ARTIFACTORY_PASSWORD }}

- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
report_paths: "test/build/test-results/**/*.xml"
require_tests: true

# Workaround for check that is additionally created being associated
# to the wrong workflow/run. Instead no additional check is created.
# See https://github.com/mikepenz/action-junit-report/issues/40
annotate_only: true
detailed_summary: true
fail_on_failure: true

- name: Publish artifacts
run: ./gradlew publishJars
env:
ORG_GRADLE_PROJECT_wetfArtifactoryUser: ${{ secrets.WETF_ARTIFACTORY_USER }}
ORG_GRADLE_PROJECT_wetfArtifactoryPassword: ${{ secrets.WETF_ARTIFACTORY_PASSWORD }}
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/update-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,26 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Download resources
- name: Download resources and run tests
run: |
./gradlew downloads
./gradlew downloads jars publishJarsToMavenLocal :test:test
env:
ORG_GRADLE_PROJECT_wetfArtifactoryUser: ${{ secrets.WETF_ARTIFACTORY_USER }}
ORG_GRADLE_PROJECT_wetfArtifactoryPassword: ${{ secrets.WETF_ARTIFACTORY_PASSWORD }}

- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
report_paths: "test/build/test-results/**/*.xml"
require_tests: true

# Workaround for check that is additionally created being associated
# to the wrong workflow/run. Instead no additional check is created.
# See https://github.com/mikepenz/action-junit-report/issues/40
annotate_only: true
detailed_summary: true
fail_on_failure: true

- name: Create Pull Request for changes
# https://github.com/marketplace/actions/create-pull-request
Expand Down

0 comments on commit 5ae15ca

Please sign in to comment.