Skip to content

Commit

Permalink
Merge pull request #18 from lloc/codecov-action
Browse files Browse the repository at this point in the history
Codecav action
  • Loading branch information
lloc authored Oct 12, 2024
2 parents 9cdc9ce + 3b8a79a commit 3e3be89
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
1 change: 1 addition & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/bin
/reports
/tests
coverage.xml
.distignore
.gitattributes
.gitignore
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
name: Test
name: UnitTests and CodeCoverage
on: [push]
jobs:
pest:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Composer dependencies
run: composer install
- name: Run Testsuite
run: vendor/bin/pest
code-coverages:
runs-on: ubuntu-latest
needs: unit-tests
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Composer dependencies
run: composer install
- name: Run Testsuite
run: php -d xdebug.mode=coverage vendor/bin/pest --coverage-clover=coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
composer.lock
.phpunit.result.cache
.idea/
vendor/
reports/
mslsmenu/
mslsmenu.zip
composer.lock
mslsmenu.zip
coverage.xml

0 comments on commit 3e3be89

Please sign in to comment.