-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Codecov to GitHub Actions Workflow (#4)
* Add Codecov report upload step in PHP workflow This commit introduces a new step in the PHP GitHub workflow to upload code coverage reports to Codecov. Using the Codecov action with a specified token and project slug, we can enhance our code quality monitoring with detailed coverage metrics. * Add separate workflow for Codecov Moved the Codecov coverage reporting to its own workflow file named codecov.yml. Removed the Codecov reporting steps from the original workflow file php.yml. This separation allows the Codecov action to run independently, providing more flexibility in managing our CI/CD processes. * Add codecov badge to README The codecov badge has been introduced to the README.md file. This will aid in visualising code coverage stats and the overall test coverage for the project.
- Loading branch information
1 parent
38003a9
commit f05ded2
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Workflow for Codecov | ||
on: [push, pull_request] | ||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up php 8.2 | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "8.2" | ||
extensions: mbstring, xml, zip, pdo_mysql, xhprof | ||
|
||
- name: Install dependencies | ||
run: composer self-update && composer install && composer dump-autoload | ||
|
||
- name: Run tests and collect coverage | ||
run: vendor/bin/phpunit | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
slug: MarjovanLier/StringManipulation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
## 2024-02-18 | ||
|
||
### Added | ||
- Introduced a new step in the GitHub Actions workflow for PHP to upload code coverage reports to Codecov. This enhancement will allow tracking of code coverage statistics for the project. | ||
|
||
## 2024-02-18 | ||
|
||
### Changed | ||
- Enhanced documentation in the `searchWords` function in `StringManipulation.php` for improved code readability. The added comments explain the function's operations such as null-checking, applying name-fixing standards, replacing special characters and underscores, removing accents, and reducing spaces. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters