forked from secultce/aurora
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add php code coverage (secultce#515)
- Loading branch information
1 parent
a7ffc8e
commit e116d4b
Showing
11 changed files
with
116 additions
and
21 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,46 @@ | ||
name: Tests with coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
code-coverage: | ||
name: Run PHPUnit with coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Start the aurora | ||
run: docker compose up -d --build | ||
|
||
- name: Install dependencies | ||
run: docker compose exec --user root php composer install | ||
|
||
- name: Generate public/private keys for use in your application. | ||
run: docker compose exec --user root php bin/console lexik:jwt:generate-keypair | ||
|
||
- name: Give permissions for var | ||
run: sudo chmod -R 777 var/ | ||
|
||
- name: Give permissions for assets/uploads | ||
run: chmod -R 777 assets/uploads | ||
|
||
- name: Create the phpunit.xml | ||
run: docker compose exec --user root php cp phpunit.xml.dist phpunit.xml | ||
|
||
- name: Run migrations | ||
run: docker compose exec php bin/console d:m:migrate -n | ||
|
||
- name: Run fixtures | ||
run: docker compose exec php bin/console d:f:l -n --purge-exclusions=city --purge-exclusions=state | ||
|
||
- name: Start the PHPUnit | ||
run: docker compose exec --user root -T php bash -c "php -d memory_limit=512M bin/phpunit --coverage-clover=coverage.xml" | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
files: coverage.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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