Skip to content

Commit

Permalink
fix extension initialization (fixes #123, via #126)
Browse files Browse the repository at this point in the history
  • Loading branch information
remorhaz authored May 27, 2024
1 parent 97cfea0 commit 8399110
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
os:
- ubuntu-latest
- windows-latest
Expand All @@ -29,10 +30,7 @@ jobs:
- "--prefer-lowest"
steps:
- name: Checkout
uses: actions/[email protected]

- name: Validate composer.json and composer.lock
run: composer validate
uses: actions/checkout@v4

- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
Expand All @@ -42,17 +40,14 @@ jobs:
coverage: xdebug
ini-values: error_reporting=E_ALL

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer update
--prefer-dist
--no-progress
${{ matrix.composer-options }}

- name: Run tests
if: ${{ matrix.php-version != '8.2' }}
run: composer test

- name: Run tests (experimental)
if: ${{ matrix.php-version == '8.2' }}
continue-on-error: true
run: composer test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extensions:
outputDirectory: allure-results
linkTemplates:
issue: https://example.org/issues/%s
setipHook: My\SetupHook
setupHook: My\SetupHook
```
`outputDirectory` is used to store Allure results and will be calculated
Expand Down
14 changes: 14 additions & 0 deletions src/AllureCodeception.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,21 @@ final class AllureCodeception extends Extension
* @throws ConfigurationException
* phpcs:disable PSR2.Methods.MethodDeclaration.Underscore
*/
public function _initialize(): void
{
parent::_initialize();
$this->reconfigure();
}

/**
* @throws ConfigurationException
*/
public function moduleInit(): void
{
$this->reconfigure();
}

private function reconfigure(): void
{
QametaAllure::reset();
$this->testLifecycle = null;
Expand Down

0 comments on commit 8399110

Please sign in to comment.