From 20b6f6ec19d4b2bc4dfea2b51134dfc9ecc49b90 Mon Sep 17 00:00:00 2001 From: Spuds Date: Sun, 14 Apr 2024 10:29:13 -0500 Subject: [PATCH] ! coverage reports now requires token --- .github/setup-results.sh | 3 ++- .github/setup-selenium.sh | 7 ++++++- .github/workflows/tests.yaml | 9 ++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/setup-results.sh b/.github/setup-results.sh index 3f5a1535b4..00ca6c57f7 100755 --- a/.github/setup-results.sh +++ b/.github/setup-results.sh @@ -8,6 +8,7 @@ set +x # Passed params DB=$1 PHP_VERSION=$2 +CODECOV_TOKEN=$3 # Build a config string for PHPUnit CONFIG="--verbose --configuration .github/phpunit-${DB}.xml" @@ -18,5 +19,5 @@ vendor/bin/phpunit ${CONFIG} # Agents will merge all coverage data... if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]] then - bash <(curl -s https://codecov.io/bash) -s "/tmp" -f '*.xml' + bash <(curl -s https://codecov.io/bash) -s "/tmp" -f '*.xml' -t "${CODECOV_TOKEN}" fi diff --git a/.github/setup-selenium.sh b/.github/setup-selenium.sh index 1c6eb7b360..59678735a2 100755 --- a/.github/setup-selenium.sh +++ b/.github/setup-selenium.sh @@ -6,6 +6,11 @@ set -e set -x +# Passed params +DB=$1 +PHP_VERSION=$2 +CODECOV_TOKEN=$3 + # Per actions in the tests.yaml file # # Current Versions for Ref @@ -42,6 +47,6 @@ else # Agents will merge all coverage data... if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]] then - bash <(curl -s https://codecov.io/bash) -s "/tmp" -f '*.clover' + bash <(curl -s https://codecov.io/bash) -s "/tmp" -f '*.xml' -t "${CODECOV_TOKEN}" fi fi \ No newline at end of file diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c19fb36cbb..e355c41b08 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -96,7 +96,8 @@ jobs: env: DB: ${{ matrix.db }} PHP_VERSION: ${{ matrix.php }} - run: .github/setup-selenium.sh $DB $PHP_VERSION + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + run: .github/setup-selenium.sh $DB $PHP_VERSION $CODECOV_TOKEN working-directory: ./elkarte continue-on-error: true @@ -244,7 +245,8 @@ jobs: env: DB: ${{steps.database-type.outputs.db}} PHP_VERSION: ${{ matrix.php }} - run: .github/setup-results.sh $DB $PHP_VERSION + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + run: .github/setup-results.sh $DB $PHP_VERSION $CODECOV_TOKEN working-directory: ./elkarte # END MySQL and MariaDB Job @@ -323,6 +325,7 @@ jobs: env: DB: ${{steps.database-type.outputs.db}} PHP_VERSION: ${{ matrix.php }} - run: .github/setup-results.sh $DB $PHP_VERSION + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + run: .github/setup-results.sh $DB $PHP_VERSION $CODECOV_TOKEN working-directory: ./elkarte # END Postgres Job \ No newline at end of file