Upgrade to Gradle 8.4 #1066
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "gradle-actions" | |
on: | |
push: | |
branches: | |
- master | |
- feature/* | |
- fix/* | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- name: Set up NodeJS 18 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- name: Set up Semantic Release | |
run: npm -g install @semantic-release/git [email protected] | |
- name: Semantic Release | |
run: npx [email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Validate code formatting | |
run: ./gradlew verGJF | |
- name: Execute build test and report | |
run: ./gradlew jacocoTestReport --refresh-dependencies --no-daemon --continue | |
- name: copy the reportTest to codeCoverage | |
run: cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed" | |
- name: Push codeCoverage to Codecov | |
run: bash <(curl -s https://codecov.io/bash) | |
- name: Run sonarqube | |
if: github.event.pull_request.head.repo.fork == false | |
run: ./gradlew sonarqube --stacktrace | |
-Dsonar.login=${{ secrets.SONAR_TOKEN }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Next steps will only run if generation code templates have been changed | |
- name: Detect changes in generated code | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
templates: | |
- 'src/main/resources/**' | |
- 'src/main/java/co/com/bancolombia/Constants.java' | |
- 'src/main/java/co/com/bancolombia/factory/**' | |
# Generated code Analysis | |
- name: Publish local | |
if: steps.changes.outputs.templates == 'true' | |
run: ./publish_plugin_local.sh | |
- name: Set up JDK 17 | |
if: steps.changes.outputs.templates == 'true' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
# Generated code reactive | |
- name: Generate reactive project to scan | |
if: steps.changes.outputs.templates == 'true' | |
run: ./generate_project.sh reactive | |
- name: Scan generated reactive project dependencies | |
if: steps.changes.outputs.templates == 'true' | |
working-directory: ./build/toscan | |
run: ./gradlew build dependencyCheckAnalyze && ./gradlew it && cat applications/app-service/build/reports/dependency-check-sonar.json | |
- name: Sonar analysis for generated reactive project | |
if: github.event.pull_request.head.repo.fork == false && steps.changes.outputs.templates == 'true' | |
working-directory: ./build/toscan | |
run: ./gradlew sonarqube --stacktrace | |
-Dsonar.login=${{ secrets.SONAR_TOKEN_GENERATED }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Generated code imperative | |
- name: Generate imperative project to scan | |
if: steps.changes.outputs.templates == 'true' | |
run: ./generate_project.sh imperative | |
- name: Scan generated imperative project dependencies | |
if: steps.changes.outputs.templates == 'true' | |
working-directory: ./build/toscan | |
run: ./gradlew build dependencyCheckAnalyze && ./gradlew it && cat applications/app-service/build/reports/dependency-check-sonar.json | |
- name: Sonar analysis for generated imperative project | |
if: github.event.pull_request.head.repo.fork == false && steps.changes.outputs.templates == 'true' | |
working-directory: ./build/toscan | |
run: ./gradlew sonarqube --stacktrace | |
-Dsonar.login=${{ secrets.SONAR_TOKEN_GENERATED_I }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |