Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to GitHub actions #231

Merged
merged 26 commits into from
Feb 12, 2021
Merged

Switch to GitHub actions #231

merged 26 commits into from
Feb 12, 2021

Conversation

dennisameling
Copy link
Member

Since travis-ci.org will be shutdown on December 31st, we either need to move to travis-ci.com (where a credit limit applies) or move to GH Actions. We just did the latter with mautic/mautic, so with this PR I'm doing the same for the API library.

@cla-bot cla-bot bot added the cla-signed label Nov 23, 2020
@dennisameling dennisameling changed the title Switch to GitHub actions [WIP] Switch to GitHub actions Nov 24, 2020
@dennisameling dennisameling marked this pull request as draft November 24, 2020 08:39
@dennisameling dennisameling removed the request for review from escopecz November 24, 2020 08:39
@escopecz
Copy link
Member

Nice! I can see some failed tests. Since most of them are from MessagesTest.php it I assume that the plugin that is able to send SMS is unpublished. I think that's the Twilio plugin.

@dennisameling
Copy link
Member Author

Twilio/SMS tests fixed, will look into the other ones during the weekend.

@dennisameling
Copy link
Member Author

Note to self: change mautic/mautic branch in CI from staging to features

@dennisameling dennisameling force-pushed the switch-to-github-actions branch from 9e0be28 to db9f1e0 Compare January 25, 2021 19:53
@dennisameling
Copy link
Member Author

Note to self: seeing this in the log artifacts, fixing this will potentially fix the failing email tests:

[2021-01-25 20:57:47] mautic.ERROR: [MAIL ERROR] Swift_TransportException: Connection could not be established with host  :stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known
Log data:
++ Starting Swift_Transport_EsmtpTransport
!! Connection could not be established with host  :stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known (code: 0) in /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:124
Stack trace:
#0 /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php(139): Swift_Plugins_LoggerPlugin->exceptionThrown()
#1 /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php(119): Swift_Events_SimpleEventDispatcher->bubble()
#2 /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(432): Swift_Events_SimpleEventDispatcher->dispatchEvent()
#3 /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(145): Swift_Transport_AbstractSmtpTransport->throwException()
#4 /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(181): Swift_Transport_AbstractSmtpTransport->start()
#5 /var/www/html/mautic/app/bundles/EmailBundle/Swiftmailer/Spool/DelegatingSpool.php(75): Swift_Transport_AbstractSmtpTransport->send()
#6 /var/www/html/mautic/app/bundles/EmailBundle/Swiftmailer/Transport/SpoolTransport.php(57): Mautic\EmailBundle\Swiftmailer\Spool\DelegatingSpool->delegateMessage()
#7 /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(71): Mautic\EmailBundle\Swiftmailer\Transport\SpoolTransport->send()
#8 /var/www/html/mautic/app/bundles/EmailBundle/Helper/MailHelper.php(431): Swift_Mailer->send()
#9 /var/www/html/mautic/app/bundles/EmailBundle/Helper/MailHelper.php(531): Mautic\EmailBundle\Helper\MailHelper->send()
#10 /var/www/html/mautic/app/bundles/EmailBundle/Model/SendEmailToContact.php(435): Mautic\EmailBundle\Helper\MailHelper->queue()
#11 /var/www/html/mautic/app/bundles/EmailBundle/Model/SendEmailToContact.php(232): Mautic\EmailBundle\Model\SendEmailToContact->sendStandardEmail()
#12 /var/www/html/mautic/app/bundles/EmailBundle/Model/EmailModel.php(1458): Mautic\EmailBundle\Model\SendEmailToContact->send()
#13 /var/www/html/mautic/app/bundles/EmailBundle/Model/EmailModel.php(1089): Mautic\EmailBundle\Model\EmailModel->sendEmail()
#14 /var/www/html/mautic/app/bundles/EmailBundle/Controller/Api/EmailApiController.php(88): Mautic\EmailBundle\Model\EmailModel->sendEmailToLists()
#15 /var/www/html/mautic/vendor/symfony/http-kernel/HttpKernel.php(151): Mautic\EmailBundle\Controller\Api\EmailApiController->sendAction()
#16 /var/www/html/mautic/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#17 /var/www/html/mautic/vendor/symfony/http-kernel/Kernel.php(200): Symfony\Component\HttpKernel\HttpKernel->handle()
#18 /var/www/html/mautic/app/AppKernel.php(104): Symfony\Component\HttpKernel\Kernel->handle()
#19 /var/www/html/mautic/app/middlewares/CORSMiddleware.php(91): AppKernel->handle()
#20 /var/www/html/mautic/app/middlewares/CatchExceptionMiddleware.php(43): Mautic\Middleware\CORSMiddleware->handle()
#21 /var/www/html/mautic/app/middlewares/Dev/IpRestrictMiddleware.php(61): Mautic\Middleware\CatchExceptionMiddleware->handle()
#22 /var/www/html/mautic/app/middlewares/VersionCheckMiddleware.php(67): Mautic\Middleware\Dev\IpRestrictMiddleware->handle()
#23 /var/www/html/mautic/app/middlewares/TrustMiddleware.php(51): Mautic\Middleware\VersionCheckMiddleware->handle()
#24 /var/www/html/mautic/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Mautic\Middleware\TrustMiddleware->handle()
#25 /var/www/html/mautic/vendor/stack/run/src/Stack/run.php(13): Stack\StackedHttpKernel->handle()
#26 /var/www/html/mautic/index_dev.php(25): Stack\run()
#27 {main} (send); [email protected] {"exception":"[object] (Swift_TransportException(code: 0): Connection could not be established with host  :stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known
Log data:
++ Starting Swift_Transport_EsmtpTransport
!! Connection could not be established with host  :stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known (code: 0) at /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:124)
[stacktrace]
#0 /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php(139): Swift_Plugins_LoggerPlugin->exceptionThrown()
#1 /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php(119): Swift_Events_SimpleEventDispatcher->bubble()
#2 /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(432): Swift_Events_SimpleEventDispatcher->dispatchEvent()
#3 /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(145): Swift_Transport_AbstractSmtpTransport->throwException()
#4 /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(181): Swift_Transport_AbstractSmtpTransport->start()
#5 /var/www/html/mautic/app/bundles/EmailBundle/Swiftmailer/Spool/DelegatingSpool.php(75): Swift_Transport_AbstractSmtpTransport->send()
#6 /var/www/html/mautic/app/bundles/EmailBundle/Swiftmailer/Transport/SpoolTransport.php(57): Mautic\\EmailBundle\\Swiftmailer\\Spool\\DelegatingSpool->delegateMessage()
#7 /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(71): Mautic\\EmailBundle\\Swiftmailer\\Transport\\SpoolTransport->send()
#8 /var/www/html/mautic/app/bundles/EmailBundle/Helper/MailHelper.php(431): Swift_Mailer->send()
#9 /var/www/html/mautic/app/bundles/EmailBundle/Helper/MailHelper.php(531): Mautic\\EmailBundle\\Helper\\MailHelper->send()
#10 /var/www/html/mautic/app/bundles/EmailBundle/Model/SendEmailToContact.php(435): Mautic\\EmailBundle\\Helper\\MailHelper->queue()
#11 /var/www/html/mautic/app/bundles/EmailBundle/Model/SendEmailToContact.php(232): Mautic\\EmailBundle\\Model\\SendEmailToContact->sendStandardEmail()
#12 /var/www/html/mautic/app/bundles/EmailBundle/Model/EmailModel.php(1458): Mautic\\EmailBundle\\Model\\SendEmailToContact->send()
#13 /var/www/html/mautic/app/bundles/EmailBundle/Model/EmailModel.php(1089): Mautic\\EmailBundle\\Model\\EmailModel->sendEmail()
#14 /var/www/html/mautic/app/bundles/EmailBundle/Controller/Api/EmailApiController.php(88): Mautic\\EmailBundle\\Model\\EmailModel->sendEmailToLists()
#15 /var/www/html/mautic/vendor/symfony/http-kernel/HttpKernel.php(151): Mautic\\EmailBundle\\Controller\\Api\\EmailApiController->sendAction()
#16 /var/www/html/mautic/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()
#17 /var/www/html/mautic/vendor/symfony/http-kernel/Kernel.php(200): Symfony\\Component\\HttpKernel\\HttpKernel->handle()
#18 /var/www/html/mautic/app/AppKernel.php(104): Symfony\\Component\\HttpKernel\\Kernel->handle()
#19 /var/www/html/mautic/app/middlewares/CORSMiddleware.php(91): AppKernel->handle()
#20 /var/www/html/mautic/app/middlewares/CatchExceptionMiddleware.php(43): Mautic\\Middleware\\CORSMiddleware->handle()
#21 /var/www/html/mautic/app/middlewares/Dev/IpRestrictMiddleware.php(61): Mautic\\Middleware\\CatchExceptionMiddleware->handle()
#22 /var/www/html/mautic/app/middlewares/VersionCheckMiddleware.php(67): Mautic\\Middleware\\Dev\\IpRestrictMiddleware->handle()
#23 /var/www/html/mautic/app/middlewares/TrustMiddleware.php(51): Mautic\\Middleware\\VersionCheckMiddleware->handle()
#24 /var/www/html/mautic/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Mautic\\Middleware\\TrustMiddleware->handle()
#25 /var/www/html/mautic/vendor/stack/run/src/Stack/run.php(13): Stack\\StackedHttpKernel->handle()
#26 /var/www/html/mautic/index_dev.php(25): Stack\
un()
#27 {main}
"} 

@codecov-io
Copy link

Codecov Report

Merging #231 (6750721) into master (6a821de) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #231   +/-   ##
=========================================
  Coverage     51.45%   51.45%           
  Complexity      406      406           
=========================================
  Files            30       30           
  Lines          1028     1028           
=========================================
  Hits            529      529           
  Misses          499      499           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a821de...6750721. Read the comment docs.

@dennisameling dennisameling marked this pull request as ready for review January 26, 2021 12:49
@dennisameling
Copy link
Member Author

@escopecz this should be good to go now 😊 would you mind checking the code so we can get this merged? Thanks!

@dennisameling dennisameling changed the title [WIP] Switch to GitHub actions Switch to GitHub actions Jan 26, 2021
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

mailhog:
image: mailhog/mailhog:latest
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using MailHog so it will catch emails - without this, the email tests will fail

uses: rtCamp/action-slack-notify@v2
if: ${{ failure() && github.event_name == 'schedule' }}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: waiting for @alanhartless to approve my Slack webhook request in the Slack workspace 😊

Copy link
Member Author

@dennisameling dennisameling Jan 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Secret SLACK_WEBHOOK has now been added to this repo 🚀 ✔️

pull_request:
schedule:
# Run every day at 10 AM UTC to discover potential issues with recent changes to Mautic itself
- cron: '0 10 * * *'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this cron will allow us to discover potential issues with recent merges in mautic/mautic much earlier than we can now

@dennisameling
Copy link
Member Author

Merging this PR after checking with @RCheesley 👍🏼

@dennisameling dennisameling merged commit e456fe9 into master Feb 12, 2021
@dennisameling dennisameling deleted the switch-to-github-actions branch February 12, 2021 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants