pipeline.github.github.yaml.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scaffold-clean-architecture Show documentation
Show all versions of scaffold-clean-architecture Show documentation
Gradle plugin to create a clean application in Java that already works, It follows our best practices!
name: 'github-actions-{{projectName}}'
on:
release:
types: [published]
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Execute jacocoTestReport
run: ./gradlew test jacocoTestReport
- name: copy the reportTest to codeCoverage
run: cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed"
- name: Build with Gradle
run: ./gradlew build --refresh-dependencies --no-daemon --continue
# TODO: Add all other tasks that your project require in build job
release:
if: github.event_name == 'release'
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# TODO: Add all other tasks that your project require in release job