Skip to content

Commit

Permalink
upload checkstyle report, always upload artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
farrell-m committed Feb 12, 2025
1 parent ce96ad0 commit f5ec411
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 4 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/feature-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ jobs:
uses: gradle/actions/setup-gradle@v4

- name: Build & test
run: ./gradlew build jacocoTestCoverageVerification -Pversion=${{ steps.capture_version.outputs.app_version }}
run: ./gradlew build -Pversion=${{ steps.capture_version.outputs.app_version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Test coverage verification
run: ./gradlew jacocoTestCoverageVerification

- name: Integration test
run: ./gradlew integrationTest -Pversion=${{ steps.capture_version.outputs.app_version }}

Expand All @@ -64,6 +67,30 @@ jobs:
name: data-api-jar
path: data-service/build/libs/data-service-${{ steps.capture_version.outputs.app_version }}.jar

- name: Upload checkstyle report
if: always()
uses: actions/upload-artifact@v4
with:
name: checkstyle-report
path: data-service/build/reports/checkstyle
retention-days: 14

- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: test-report
path: data-service/build/reports/tests
retention-days: 14

- name: Upload jacoco coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: jacoco-coverage-report
path: data-service/build/reports/jacoco
retention-days: 14

ecr:
needs: [ build-test-publish, define-image-tag ]
runs-on: ubuntu-latest
Expand Down
29 changes: 28 additions & 1 deletion .github/workflows/pr-merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ jobs:
uses: gradle/actions/setup-gradle@v4

- name: Build & test
run: ./gradlew build jacocoTestCoverageVerification
run: ./gradlew build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Test coverage verification
run: ./gradlew jacocoTestCoverageVerification

- name: Integration test
run: ./gradlew integrationTest

Expand All @@ -50,6 +53,30 @@ jobs:
- name: Update version
run: ./gradlew release -Prelease.useAutomaticVersion=true

- name: Upload checkstyle report
if: always()
uses: actions/upload-artifact@v4
with:
name: checkstyle-report
path: data-service/build/reports/checkstyle
retention-days: 14

- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: test-report
path: data-service/build/reports/tests
retention-days: 14

- name: Upload jacoco coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: jacoco-coverage-report
path: data-service/build/reports/jacoco
retention-days: 14

vulnerability-report:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
Expand Down
29 changes: 28 additions & 1 deletion .github/workflows/push-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ jobs:
uses: gradle/actions/setup-gradle@v4

- name: Build & test
run: ./gradlew build jacocoTestCoverageVerification
run: ./gradlew build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Test coverage verification
run: ./gradlew jacocoTestCoverageVerification

- name: Integration test
run: ./gradlew integrationTest

Expand All @@ -47,6 +50,30 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload checkstyle report
if: always()
uses: actions/upload-artifact@v4
with:
name: checkstyle-report
path: data-service/build/reports/checkstyle
retention-days: 14

- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: test-report
path: data-service/build/reports/tests
retention-days: 14

- name: Upload jacoco coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: jacoco-coverage-report
path: data-service/build/reports/jacoco
retention-days: 14

vulnerability-scan:
runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'net.researchgate.release' version '3.0.2'
id 'uk.gov.laa.ccms.springboot.laa-ccms-spring-boot-gradle-plugin' version '0.0.24' apply false
id 'uk.gov.laa.ccms.springboot.laa-ccms-spring-boot-gradle-plugin' version '0.0.25' apply false
}

subprojects {
Expand Down
2 changes: 2 additions & 0 deletions data-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ test {

// Hide warning for dynamic loading of agents https://github.com/mockito/mockito/issues/3037
jvmArgs '-XX:+EnableDynamicAgentLoading'

finalizedBy jacocoTestReport
}

jacocoTestReport {
Expand Down

0 comments on commit f5ec411

Please sign in to comment.