-
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.
* **BREAKING CHANGES** - Only support PHP 8.3 - Make classes read-only when possible - Add types to constants - Upgrade PHPUnit to v11.3 - Use static versions of asserts and expectations of invocations - Change CI pipeline to use PHP 8.3 - Bump to use `kununu/data-fixtures` 12.0 - Changes on `AbstractTestCase` and children (`FixturesAwareTestCase` and `WebTestCase`): - `getFixturesContainer` now has the Symfony `ContainerInterface` and not PSR interface as its return type - Add `getServiceFromContainer` - Add `getParameterFromContainer` - Add `FixturesContainerGetterTrait` to help getting common services from the test container: - `getConnection` to get a Doctrine DBAL connection - `getCachePool` to get a CacheItemPoolInterface - `getElasticsearchClient` to get an Elasticsearch client - `getHttpClient` to get a Symfony Http client - Update documentation * Only use highest on CI pipeline * Use pcov as coverage driver in CI pipeline * Add tests to AbstractTestCase::getServiceFromContainer and AbstractTestCase::getParameterFromContainer
- Loading branch information
1 parent
d476723
commit b21210c
Showing
68 changed files
with
613 additions
and
431 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 |
---|---|---|
|
@@ -17,17 +17,13 @@ jobs: | |
strategy: | ||
matrix: | ||
php-version: | ||
- 8.1 | ||
- 8.3 | ||
mysql-version: | ||
- 5.7 | ||
elasticsearch-version: | ||
- 6.8.15 | ||
dependencies: | ||
- lowest | ||
- highest | ||
exclude: | ||
- php-version: 8.1 | ||
dependencies: lowest | ||
|
||
services: | ||
mysql: | ||
|
@@ -60,7 +56,7 @@ jobs: | |
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: xdebug | ||
coverage: pcov | ||
extensions: ${{ matrix.extensions }} | ||
|
||
- name: Install Composer Dependencies | ||
|
@@ -79,7 +75,7 @@ jobs: | |
DATABASE_SERVER_VERSION: ${{ matrix.mysql-version }} | ||
|
||
- name: Run PHPUnit | ||
run: vendor/bin/phpunit | ||
run: vendor/bin/phpunit --log-junit tests/.results/tests-junit.xml --coverage-clover tests/.results/tests-clover.xml | ||
env: | ||
DEF_DATABASE_URL: mysql://root:[email protected]:${{ job.services.mysql.ports['3306'] }}/default_db | ||
PERSISTENCE_DATABASE_URL: mysql://root:[email protected]:${{ job.services.mysql.ports['3306'] }}/persistence_db | ||
|
@@ -91,6 +87,7 @@ jobs: | |
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ github.job }}-${{ matrix.php-version }}-${{ matrix.dependencies }}-coverage | ||
include-hidden-files: true | ||
path: tests/.results/ | ||
|
||
sonarcloud: | ||
|
@@ -104,7 +101,7 @@ jobs: | |
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: build-8.1-highest-coverage | ||
name: build-8.3-highest-coverage | ||
path: tests/.results/ | ||
|
||
- name: Fix Code Coverage Paths | ||
|
@@ -114,7 +111,7 @@ jobs: | |
sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' tests-junit.xml | ||
- name: SonarCloud Scan | ||
uses: sonarsource/sonarcloud-github-action@master | ||
uses: sonarsource/sonarcloud-github-action@v3.0.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_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
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
Oops, something went wrong.