Skip to content

Commit

Permalink
Merge code coverage and tests workflow + change to OtterWise
Browse files Browse the repository at this point in the history
  • Loading branch information
pelmered committed Sep 27, 2024
1 parent 5224457 commit d7c2ebf
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 30 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/code-coverage.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,35 @@ jobs:
run: vendor/bin/phpunit --testsuite=default
- name: Execute tests
run: vendor/bin/phpunit

report-metrics:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: pcov
- name: Install dependencies
run: composer update --prefer-stable --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit --coverage-clover=build/logs/clover.xml
# - name: Execute type coverage tests
# run: vendor/bin/pest --type-coverage --type-coverage-json=build/logs/pest-coverage.json

- name: Upload Test Coverage
env:
OTTERWISE_TOKEN: ${{ secrets.OTTERWISE_TOKEN }}
run: bash <(curl -s https://raw.githubusercontent.com/getOtterWise/bash-uploader/main/uploader.sh)

# - name: Upload Types Coverage
# env:
# OTTERWISE_TOKEN: ${{ secrets.OTTERWISE_TOKEN }}
# run: bash <(curl -s https://raw.githubusercontent.com/getOtterWise/bash-uploader/main/uploader.sh) --type-coverage-file build/logs/pest-coverage.json

0 comments on commit d7c2ebf

Please sign in to comment.