From d1478cda90e208f1d44c429c68f3207d42bad62f Mon Sep 17 00:00:00 2001 From: CharlieTap Date: Fri, 9 Feb 2024 10:00:55 +0000 Subject: [PATCH 1/4] added codecov to build workflow --- .github/workflows/build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f28dbd..fe55b61 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: - name: Clone Repo uses: actions/checkout@v4 - - name: Set up jdk@17 + - name: Set up jdk@21 uses: actions/setup-java@v3 with: distribution: 'corretto' @@ -35,3 +35,9 @@ jobs: - name: Execute Gradle build run: ./gradlew build + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + env: + token: ${{ secrets.CODECOV_TOKEN }} + slug: CharlieTap/cachemap From 9f34ec58033a94f2585d80b434ff6fd9e1f8a0b6 Mon Sep 17 00:00:00 2001 From: CharlieTap Date: Fri, 9 Feb 2024 10:32:18 +0000 Subject: [PATCH 2/4] allow workflows to inherit secrets --- .github/workflows/pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 395233d..8abf7c8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,5 +13,6 @@ jobs: matrix: os: [ macos-latest, ubuntu-latest, windows-latest ] uses: ./.github/workflows/build.yml + secrets: inherit with: runner: ${{ matrix.os }} From 9a3f3585ae58b22c640ce02dd713c935ab62b58d Mon Sep 17 00:00:00 2001 From: CharlieTap Date: Fri, 9 Feb 2024 10:43:06 +0000 Subject: [PATCH 3/4] add token explicitly to build workflow --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe55b61..5818de9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,9 @@ on: description: 'The machine runner the workflow should run on' default: macos-latest required: false + secrets: + CODECOV_TOKEN: + required: true workflow_dispatch: inputs: runner: From 43de4de7710b3924ad305d2c70a8dd1d3ebe4a1d Mon Sep 17 00:00:00 2001 From: CharlieTap Date: Fri, 9 Feb 2024 11:22:04 +0000 Subject: [PATCH 4/4] workflow call non inherit --- .github/workflows/pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8abf7c8..cdd2ec5 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,6 +13,7 @@ jobs: matrix: os: [ macos-latest, ubuntu-latest, windows-latest ] uses: ./.github/workflows/build.yml - secrets: inherit + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: runner: ${{ matrix.os }}