Feature/shopware 145 add plugin logic #11
Workflow file for this run
This file contains hidden or 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
name: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-platform: | |
name: 'Test' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout Code' | |
uses: actions/checkout@v4 | |
- name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
tools: composer | |
coverage: 'xdebug3' | |
- name: 'Validate composer.json and composer.lock' | |
shell: bash | |
run: composer validate | |
- name: 'Install Composer Dependencies' | |
shell: bash | |
run: composer install --prefer-dist --no-progress --no-interaction --optimize-autoloader | |
- name: 'Run Unit Tests' | |
shell: bash | |
env: | |
XDEBUG_MODE: 'coverage' | |
run: vendor/bin/phpunit tests/Unit | |
- name: 'Generate Unit Test Code Coverage Summary Report' | |
uses: saschanowak/CloverCodeCoverageSummary@0.3.1 | |
with: | |
filename: .Build/Artifacts/Reports/Unit/clover.xml | |
- name: 'Add Unit Test Code Coverage to file' | |
shell: bash | |
run: | | |
echo '## Code Coverage Summery for unit tests' >> code-coverage-merged.md | |
cat code-coverage-summary.md >> code-coverage-merged.md | |
echo '## Code Coverage for unit tests' >> $GITHUB_STEP_SUMMARY | |
cat code-coverage-summary.md >> $GITHUB_STEP_SUMMARY | |
cat code-coverage-details.md >> $GITHUB_STEP_SUMMARY | |
- name: 'Add Code Coverage as PR Comment' | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
recreate: true | |
path: code-coverage-merged.md |