From 4a26c71d5a44c5bc261c5f19a8b2ea803377cec2 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 21 May 2020 10:43:06 -0400 Subject: [PATCH 1/5] ci.yaml --- .github/workflows/ci.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..31533415b --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,25 @@ +on: + push: + branches: + - master + pull_request: +name: ci +jobs: + units: + runs-on: ubuntu-latest + strategy: + matrix: + java: [7, 8, 11] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + - name: coverage + uses: codecov/codecov-action@v1 + with: + name: actions ${{ matrix.java }} \ No newline at end of file From 3999ea1ec644aff1242de9ccdde87ed9234f2718 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 21 May 2020 10:45:56 -0400 Subject: [PATCH 2/5] echo message --- .kokoro/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 29a21d612..73648ba72 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -15,6 +15,8 @@ set -eo pipefail +echo "Hello GitHub Action" + cd github/gax-java/ # Print out Java From 2a0febc6402b4bf28d79e1c52d0b830281877b03 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 21 May 2020 10:48:28 -0400 Subject: [PATCH 3/5] Set directory to run the build script --- .kokoro/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 73648ba72..ea2260d3f 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -17,7 +17,9 @@ set -eo pipefail echo "Hello GitHub Action" -cd github/gax-java/ +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. # Print out Java java -version From d5971a145b659664e1d18b00980ee351104dced1 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 21 May 2020 10:53:54 -0400 Subject: [PATCH 4/5] Code coverage script --- .kokoro/build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index ea2260d3f..8bcf7e298 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -15,8 +15,6 @@ set -eo pipefail -echo "Hello GitHub Action" - scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) ## cd to the parent directory, i.e. the root of the git repo cd ${scriptDir}/.. @@ -28,4 +26,7 @@ echo $JOB_TYPE ./gradlew assemble ./gradlew build install -bash $KOKORO_GFILE_DIR/codecov.sh +if [ "${REPORT_COVERAGE}" == "true" ] +then + bash ${KOKORO_GFILE_DIR}/codecov.sh +fi From 0d164aac18617b0708cff49fc11523480db1b852 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 21 May 2020 10:59:37 -0400 Subject: [PATCH 5/5] Added Linkage Monitor --- .github/workflows/ci.yaml | 11 ++++++++++- .kokoro/linkage-monitor.sh | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 31533415b..025b8c088 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,4 +22,13 @@ jobs: - name: coverage uses: codecov/codecov-action@v1 with: - name: actions ${{ matrix.java }} \ No newline at end of file + name: actions ${{ matrix.java }} + linkage-monitor: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/linkage-monitor.sh \ No newline at end of file diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh index 2f78d139f..e0ed52cc2 100755 --- a/.kokoro/linkage-monitor.sh +++ b/.kokoro/linkage-monitor.sh @@ -17,7 +17,9 @@ set -eo pipefail # Display commands being run. set -x -cd github/gax-java/ +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. # Print out Java version java -version