Skip to content

Commit

Permalink
Add more reporting outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva authored Apr 28, 2022
1 parent be29c44 commit a4ac8e6
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,65 @@ jobs:
run: echo Result ${{ steps.run-coverage-parser.outputs.average_coverage }}
- name: Post the result to server
run: 'curl -X POST https://cdn.desilva.se/microservices/coverbadges/api.php -H "Content-Type: application/x-www-form-urlencoded" -d "repo=https://github.com/hydephp/hyde&value=${{ steps.run-coverage-parser.outputs.average_coverage }}&token=${{ secrets.COVERBADGES_SECRET }}"'

create-coverage-report:
needs: update-coverage # If the previous job fails due to a test failure we don't need to try again
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
coverage: xdebug
extensions: fileinfo
- uses: actions/checkout@v2
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Set Framework version to dev-master
run: composer require hyde/framework:dev-master
- name: Set environment to testing
run: echo "ENV=testing" > .env
- name: Run tests with HTML coverage reporting
run: vendor/bin/pest --coverage-html covrep
env:
ENV: testing

- name: Upload the report as an artifact
uses: actions/upload-artifact@v1
with:
name: 'report.txt'
path: 'report.txt'


output-coverage:
needs: update-coverage # If the previous job fails due to a test failure we don't need to try again
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
coverage: xdebug
extensions: fileinfo
- uses: actions/checkout@v2
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Set Framework version to dev-master
run: composer require hyde/framework:dev-master
- name: Set environment to testing
run: echo "ENV=testing" > .env
- name: Run tests with output coverage reporting
run: vendor/bin/pest --coverage
env:
ENV: testing

- name: Upload the report as an artifact
uses: actions/upload-artifact@v1
with:
name: 'report.txt'
path: 'report.txt'



#create-php-docs:
# runs-on: ubuntu-latest

0 comments on commit a4ac8e6

Please sign in to comment.