Skip to content

Commit

Permalink
Merge pull request #3 from The-3Labs-Team/add-test-coverage
Browse files Browse the repository at this point in the history
Add test coverage
  • Loading branch information
murdercode committed Mar 2, 2024
2 parents 989e741 + a625422 commit e2fb703
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,25 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none
coverage: xdebug

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/pest --ci
- name: Setup Code Climate
uses: amancevice/setup-code-climate@v1
with:
cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }}

- name: Install Code Climate Test Reporter
run: cc-test-reporter before-build

- name: Run Tests
run: |
vendor/bin/pest --coverage-clover build/logs/clover.xml
- name: Upload coverage reports to Code Climate
run: |
cc-test-reporter after-build
7 changes: 6 additions & 1 deletion src/Readability.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@

class Readability
{
private $content;
private ?FFReadability $content;

/**
* Parse the content
*
* @throws Exception
*/
public function parse(string $content): self
{
$this->content = new FFReadability(new Configuration());
Expand Down

0 comments on commit e2fb703

Please sign in to comment.