Skip to content

Commit

Permalink
! try action
Browse files Browse the repository at this point in the history
  • Loading branch information
Spuds committed Apr 15, 2024
1 parent 862a83e commit 8918b7c
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/phpunit-mariadb.xml
Expand Up @@ -30,7 +30,7 @@
<directory suffix=".php">../sources/ext</directory>
</exclude>
<report>
<clover outputFile="/tmp/madb.xml"/>
<clover outputFile="/home/runner/work/Elkarte/Elkarte/elkarte/tmp/db.xml"/>
</report>
</coverage>

Expand Down
2 changes: 1 addition & 1 deletion .github/phpunit-mysql.xml
Expand Up @@ -30,7 +30,7 @@
<directory suffix=".php">../sources/ext</directory>
</exclude>
<report>
<clover outputFile="/tmp/mydb.xml"/>
<clover outputFile="/home/runner/work/Elkarte/Elkarte/elkarte/tmp/db.xml"/>
</report>
</coverage>

Expand Down
2 changes: 1 addition & 1 deletion .github/phpunit-postgres.xml
Expand Up @@ -30,7 +30,7 @@
<directory suffix=".php">../sources/ext</directory>
</exclude>
<report>
<clover outputFile="/tmp/pgdb.xml"/>
<clover outputFile="/home/runner/work/Elkarte/Elkarte/elkarte/tmp/db.xml"/>
</report>
</coverage>

Expand Down
2 changes: 1 addition & 1 deletion .github/phpunit-webtest.xml
Expand Up @@ -26,7 +26,7 @@
<directory suffix=".php">../sources/ext</directory>
</exclude>
<report>
<clover outputFile="/tmp/web.xml"/>
<clover outputFile="/home/runner/work/Elkarte/Elkarte/elkarte/tmp/web.xml"/>
</report>
</coverage>

Expand Down
8 changes: 4 additions & 4 deletions .github/setup-failure.sh
Expand Up @@ -8,7 +8,7 @@ set -e
set +x

# Agents will merge all coverage data...
if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]
then
bash <(curl -s https://codecov.io/bash) -s "/tmp" -f '*.xml' -t "$CODECOV_TOKEN"
fi
#if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]
#then
# bash <(curl -s https://codecov.io/bash) -s "/tmp" -f '*.xml' -t "$CODECOV_TOKEN"
#fi
8 changes: 4 additions & 4 deletions .github/setup-results.sh
Expand Up @@ -12,7 +12,7 @@ CONFIG="--verbose --configuration .github/phpunit-$DB.xml"
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' -t "$CODECOV_TOKEN"
fi
#if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]
#then
# bash <(curl -s https://codecov.io/bash) -s "/tmp" -f '*.xml' -t "$CODECOV_TOKEN"
#fi
37 changes: 26 additions & 11 deletions .github/workflows/tests.yaml
Expand Up @@ -75,24 +75,24 @@ jobs:
DB: ${{ matrix.db }}
PHP_VERSION: ${{ matrix.php }}
WEBSERVER: 'nginx'
run: .github/setup-elkarte.sh $DB $PHP_VERSION
run: .github/setup-elkarte.sh
working-directory: ./elkarte

- name: Run Unit Tests
env:
DB: ${{ matrix.db }}
PHP_VERSION: ${{ matrix.php }}
run: .github/setup-selenium.sh $DB $PHP_VERSION
run: .github/setup-selenium.sh
working-directory: ./elkarte
continue-on-error: true

- name: Code Coverage
env:
DB: ${{ matrix.db }}
PHP_VERSION: ${{ matrix.php }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: .github/setup-failure.sh
working-directory: ./elkarte
- name: Send Coverage Reports
if: ${{ github.event_name == 'pull_request' }}
uses: codecov/codecov-action@v4
with:
files: /home/runner/work/Elkarte/Elkarte/elkarte/tmp/web.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: false

- name: Server Error Log
env:
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
env:
DB: ${{ matrix.db }}
PHP_VERSION: ${{ matrix.php }}
run: .github/setup-elkarte.sh $DB $PHP_VERSION
run: .github/setup-elkarte.sh
working-directory: ./elkarte

- name: Install NodeJS
Expand Down Expand Up @@ -237,9 +237,16 @@ jobs:
env:
DB: ${{steps.database-type.outputs.db}}
PHP_VERSION: ${{ matrix.php }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: .github/setup-results.sh
working-directory: ./elkarte

- name: Send Coverage Reports
if: ${{ github.event_name == 'pull_request' }}
uses: codecov/codecov-action@v4
with:
files: /home/runner/work/Elkarte/Elkarte/elkarte/tmp/db.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: false
# END MySQL and MariaDB Job

# START Postgres Tests
Expand Down Expand Up @@ -320,4 +327,12 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: .github/setup-results.sh
working-directory: ./elkarte

- name: Send Coverage Reports
if: ${{ github.event_name == 'pull_request' }}
uses: codecov/codecov-action@v4
with:
files: /home/runner/work/Elkarte/Elkarte/elkarte/tmp/db.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: false
# END Postgres Job

0 comments on commit 8918b7c

Please sign in to comment.