Skip to content

Commit

Permalink
Fix CI workflow (#47)
Browse files Browse the repository at this point in the history
* add coverage report to ci workflow

* added plugins to composer.json; applies cs fixer
  • Loading branch information
PatrickJenkner authored Aug 21, 2024
1 parent 7722373 commit ccd8f90
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,14 @@ jobs:
- name: Check PHP CS
run: ./vendor/bin/php-cs-fixer fix --config .php-cs-fixer.php --dry-run --using-cache no --show-progress dots -v
- name: Test
run: ./vendor/bin/phpunit
run: ./vendor/bin/phpunit --coverage-cobertura=coverage.xml
- name: Code Coverage
uses: irongut/[email protected]
with:
filename: coverage.xml
badge: true
format: 'markdown'
output: 'both'
- name: Write to Job Summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY

10 changes: 5 additions & 5 deletions EventListener/CampaignSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
use MauticPlugin\LeuchtfeuerPrintmailingBundle\Event\TriggerCampaignEvent;
use MauticPlugin\LeuchtfeuerPrintmailingBundle\Form\Type\ActionType;
use MauticPlugin\LeuchtfeuerPrintmailingBundle\Model\TriggerCampaignModel;
use MauticPlugin\LeuchtfeuerPrintmailingBundle\Service\PrintmailingService;
use MauticPlugin\LeuchtfeuerPrintmailingBundle\PrintmailingEvents;
use MauticPlugin\LeuchtfeuerPrintmailingBundle\Service\PrintmailingService;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class CampaignSubscriber implements EventSubscriberInterface
Expand Down Expand Up @@ -56,10 +56,10 @@ public static function getSubscribedEvents()
{
return [
CampaignEvents::CAMPAIGN_ON_BUILD => ['onCampaignBuild', 0],
PrintmailingEvents::TRIGGER_CAMPAIGN_PRE_SAVE => ['onTriggerCampaignPreSave', 0],
PrintmailingEvents::TRIGGER_CAMPAIGN_POST_SAVE => ['onTriggerCampaignPostSave', 0],
PrintmailingEvents::TRIGGER_CAMPAIGN_PRE_DELETE => ['onTriggerCampaignPreDelete', 0],
PrintmailingEvents::ON_CAMPAIGN_TRIGGER_ACTION => ['onCampaignTriggerAction', 0],
PrintmailingEvents::TRIGGER_CAMPAIGN_PRE_SAVE => ['onTriggerCampaignPreSave', 0],
PrintmailingEvents::TRIGGER_CAMPAIGN_POST_SAVE => ['onTriggerCampaignPostSave', 0],
PrintmailingEvents::TRIGGER_CAMPAIGN_PRE_DELETE => ['onTriggerCampaignPreDelete', 0],
PrintmailingEvents::ON_CAMPAIGN_TRIGGER_ACTION => ['onCampaignTriggerAction', 0],
];
}

Expand Down
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,11 @@
],
"scripts": {
"cs-fix": "./vendor/bin/php-cs-fixer fix --config .php-cs-fixer.php --using-cache no --show-progress dots -v"
},
"config": {
"allow-plugins": {
"symfony/flex": true,
"php-http/discovery": false
}
}
}

0 comments on commit ccd8f90

Please sign in to comment.