Skip to content

Commit

Permalink
Merge f705d90 into 283a30f
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmook committed Oct 7, 2019
2 parents 283a30f + f705d90 commit 3c42ca2
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 13 deletions.
39 changes: 38 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:

env:
CI: "true"
#CI_NAME: github
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}

jobs:
build:
Expand All @@ -26,12 +28,34 @@ jobs:
with:
java-version: 1.8

#- name: Set url
# run: echo ::set-env name=CI_BUILD_URL::$(echo ${GITHUB_REPOSITORY})

#- name: Set branch
# run: echo ::set-env name=CI_BRANCH::$(echo ${GITHUB_REF})
#- name: Set build number
# run: echo ::set-env name=CI_BUILD_NUMBER::$(echo ${GITHUB_SHA})
#- name: Set pr number
# run: echo ::set-env name=CI_PULL_REQUEST::$(echo ${GITHUB_REF//[^0-9]/})
# if: startsWith(github.ref, 'refs/pull/')

- name: CodeClimate
run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- name: CodeClimate2
run: chmod +x ./cc-test-reporter
- name: before
run: ./cc-test-reporter before-build

- name: Build with Gradle
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
CI_BRANCH: ${{ github.ref }}
#CI_BRANCH: ${{ github.ref }}
#CI_PULL_REQUEST: ${{ github.pull_request.number }}
run: ./gradlew assemble check --stacktrace

- name: after
run: ./cc-test-reporter after-build --coverage-input-type=jacoco

- name: Set tag version
run: echo ::set-env name=CIRCLE_TAG::$(echo ${GITHUB_REF:10})
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -42,3 +66,16 @@ jobs:
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
run: ./gradlew bintrayUpload
if: startsWith(github.ref, 'refs/tags/')

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}}


#- name: Coveralls
# uses: coverallsapp/github-action@v1.0.1
# with:
# github-token: ${{ secrets.github_token }}
# path-to-lcov: ./fixture/build/reports/jacoco/test/jacocoTestReport.xml

25 changes: 13 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id("io.gitlab.arturbosch.detekt") version "1.0.1"
}

apply(from = "$rootDir/owaspDependencyCheck.gradle.kts")
//apply(from = "$rootDir/owaspDependencyCheck.gradle.kts")

allprojects {
repositories {
Expand Down Expand Up @@ -48,14 +48,15 @@ detekt {
// config = files("detekt-config.yml")
}

println(System.getenv("GITHUB_WORKFLOW"))
println(System.getenv("GITHUB_ACTION"))
println(System.getenv("GITHUB_ACTOR"))
println(System.getenv("GITHUB_REPOSITORY"))
println(System.getenv("GITHUB_EVENT_NAME"))
println(System.getenv("GITHUB_EVENT_PATH"))
println(System.getenv("GITHUB_WORKSPACE"))
println(System.getenv("GITHUB_SHA"))
println(System.getenv("GITHUB_REF"))
println(System.getenv("GITHUB_HEAD_REF"))
println(System.getenv("GITHUB_BASE_REF"))
println(System.getenv("GITHUB_REPOSITORY")) // appmattus/kotlinfixture
// appmattus/kotlinfixture
println(System.getenv("GITHUB_EVENT_NAME")) // push
// pull_request
println(System.getenv("GITHUB_SHA")) // 283a30f046672e7df9ef67885ef29b66b8b12ade
// 59888119b32c8b239c6ee411fa2388d249676ddf
println(System.getenv("GITHUB_REF")) // refs/heads/master
// refs/pull/9/merge
println(System.getenv("CI_BRANCH")) // ? on a PR CI_BRANCH: refs/pull/9/merge
// refs/pull/9/merge
println(System.getenv("CI_PULL_REQUEST")) // ? blank on a PR
// ?

0 comments on commit 3c42ca2

Please sign in to comment.