Skip to content

Commit

Permalink
Feature/pipelines CI CD (#30)
Browse files Browse the repository at this point in the history
* workflow yml file

* workflow add

* merge actions

* CI CD Refactor

* Actions needs defined

* Publish tasks was deleted from build
  • Loading branch information
dericop authored Feb 12, 2020
1 parent 9366dd4 commit 20c744a
Showing 1 changed file with 39 additions and 24 deletions.
63 changes: 39 additions & 24 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,49 @@
name: Java CI
name: 'Gradle Actions'

on:
push:
branches:
- master


pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Execute jacocoTestReport
run: ./gradlew test jacocoTestReport && cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed"
- name: Build with Gradle
run: ./gradlew build --refresh-dependencies --no-daemon --continue
- name: Push codeCoverage to Codecov
run: bash <(curl -s https://codecov.io/bash)

release:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Execute jacocoTestReport
run: ./gradlew test jacocoTestReport && cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed"
- name: Build with Gradle
run: ./gradlew build --refresh-dependencies --no-daemon --continue
- name: Push codeCoverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
- name: Publish plugin
run: ./gradlew publishPlugins -Pgradle.publish.key=${{ secrets.KEY_GRADLE }} -Pgradle.publish.secret=${{ secrets.SECRET_GRADLE }}

#release:
# runs-on: ubuntu-latest
#needs: build
#steps:


- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Execute jacocoTestReport
run: ./gradlew test jacocoTestReport && cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed"
- name: Build with Gradle
run: ./gradlew build --refresh-dependencies --no-daemon --continue
- name: Push codeCoverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
- name: Publish plugin
run: ./gradlew publishPlugins -Pgradle.publish.key=${{ secrets.KEY_GRADLE }} -Pgradle.publish.secret=${{ secrets.SECRET_GRADLE }}

0 comments on commit 20c744a

Please sign in to comment.