Skip to content

Commit

Permalink
! coverage reports now requires token
Browse files Browse the repository at this point in the history
  • Loading branch information
Spuds committed Apr 14, 2024
1 parent 15d5129 commit c76ebd1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/phpunit-webtest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<const name="DBTYPE" value="MySQL"/>
<const name="PHPUNIT_SELENIUM" value="true"/>
<const name="PHPUNIT_TESTSUITE" value="true"/>
<const name="PHPUNIT_COVERAGE_DATA_DIRECTORY" value="\tmp"/>
</php>

</phpunit>
3 changes: 2 additions & 1 deletion .github/setup-results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
7 changes: 6 additions & 1 deletion .github/setup-selenium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
9 changes: 6 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

0 comments on commit c76ebd1

Please sign in to comment.