Update 1: Got mailatcher working but running every test now takes 4 minutes.
I need to do some Mailcatcher Acceptance Tests inside a Github Workflow. All other Tests are running fine. I also got the Mailcatcher running but installing the gem with all dependencies takes around 4 Minutes(!) which is not acceptable.
Is there a way to speed this up? The environment is LAMP.
So this is the YAML file:
name: Codeception Tests
on: [push]
jobs:
tests:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: true
matrix:
operating-system: [ubuntu-latest]
php: ["7.4"]
name: PHP ${{ matrix.php }} Test on ${{ matrix.operating-system }}
env:
php-ini-values: post_max_size=32M
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: "develop"
- name: Checkout Tests
uses: actions/checkout@v2
with:
repository: xxx/tests
ref: "develop"
path: tests
- name: Install Ruby & run mailcatcher
run: |
sudo gem install mailcatcher
mailcatcher
The composer.json
{
"name": "tests",
"description": "Tests",
"license": "GPL-2.0-or-later",
"require-dev": {
"codeception/codeception": "~4.0",
"codeception/module-asserts": "^1.0",
"codeception/module-webdriver": "^1.0",
"codeception/module-phpbrowser": "^1.0",
"codeception/module-filesystem": "^1.0",
"codeception/module-db": "^1.0",
"joomla-projects/joomla-browser": "@dev",
"joomla-projects/selenium-server-standalone": "~v3",
"fzaninotto/faker": "^1.6",
"behat/gherkin": "^4.4.1",
"phing/phing": "2.*",
"captbaritone/mailcatcher-codeception-module": "^2.2"
},
"repositories": [
{
"type": "git",
"url": "https://github.com/stell/joomla-browser"
}
]
}
The Acceptance Suite:
class_name: AcceptanceTester
modules:
enabled:
- Asserts
- JoomlaBrowser
- Helper\Acceptance
- DbHelper
- Filesystem
- MailCatcher
config:
MailCatcher:
url: "http://127.0.0.1"
port: "1080"
JoomlaBrowser:
url: "http://127.0.0.1:800