From 0f842d88f89e443b9189c93f0cfb530a8ea3ec5a Mon Sep 17 00:00:00 2001 From: Tay Yi Hsuen <69678785+yhtMinceraft1010X@users.noreply.github.com> Date: Sat, 28 May 2022 23:50:39 +0800 Subject: [PATCH] Upgrade Codecov GitHub Action to v2 (#128) Codecov GitHub Action v1 uses a deprecated bash uploader, which may cease to function soon. The v2 version also has a files arg instead of a file arg, suggesting possible deprecation of the file arg. Let's upgrade to v2, use the files arg for coverage.xml and the directory arg for the directory in which coverage.xml is found. --- .github/workflows/gradle.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 07acb40a13d..aabbbdbaf33 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -38,8 +38,9 @@ jobs: - name: Build and check with Gradle run: ./gradlew check coverage - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v2 if: runner.os == 'Linux' with: - file: ${{ github.workspace }}/build/reports/jacoco/coverage/coverage.xml + directory: ${{ github.workspace }}/build/reports/jacoco/coverage + files: coverage.xml fail_ci_if_error: true