Skip to content

Commit

Permalink
Merge pull request #77 from Codeception/use-configuration-outputdir
Browse files Browse the repository at this point in the history
Use Configuration::outputDir()
  • Loading branch information
Naktibalda committed Apr 28, 2022
2 parents 7650e49 + 13ecfeb commit d228302
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 7 deletions.
47 changes: 41 additions & 6 deletions .github/workflows/main.yml
Expand Up @@ -45,7 +45,7 @@ jobs:

strategy:
matrix:
php: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
php: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]

steps:
- name: Checkout code
Expand All @@ -64,8 +64,8 @@ jobs:

- name: Install dependencies
run: |
composer require codeception/codeception:"^4.1" --dev --prefer-source
composer require codeception/module-filesystem codeception/module-cli codeception/module-asserts codeception/module-phpbrowser --dev
composer require codeception/codeception:"4.1.x-dev" --dev --prefer-source
composer require codeception/module-filesystem:"^1.0" codeception/module-cli:"^1.0" codeception/module-asserts:"^1.0|^2.0" codeception/module-phpbrowser:"^1.0" --dev
cp c3.php vendor/codeception/codeception/tests/data/claypit
- name: Start PHP Server
Expand All @@ -80,7 +80,7 @@ jobs:

strategy:
matrix:
php: [7.2, 7.3, 7.4, 8.0]
php: [7.2, 7.3, 7.4, 8.0, 8.1]

steps:
- name: Checkout code
Expand All @@ -99,8 +99,8 @@ jobs:

- name: Install dependencies
run: |
composer require codeception/codeception:"^4.1" --dev --prefer-source
composer require codeception/module-filesystem codeception/module-cli codeception/module-asserts codeception/module-phpbrowser --dev
composer require codeception/codeception:"4.1.x-dev" --dev --prefer-source
composer require codeception/module-filesystem:"^1.0" codeception/module-cli:"^1.0" codeception/module-asserts:"^1.0|^2.0" codeception/module-phpbrowser:"^1.0" --dev
cp c3.php vendor/codeception/codeception/tests/data/claypit
- name: Start PHP Server
Expand All @@ -109,3 +109,38 @@ jobs:
- name: Run test suite
run: cd vendor/codeception/codeception && php ./codecept run coverage

codeception5:
runs-on: ubuntu-latest

strategy:
matrix:
php: [8.0, 8.1]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- name: Use Composer v2
run: composer self-update --2

- name: Validate composer.json
run: composer validate

- name: Install dependencies
run: |
composer require codeception/codeception:"5.0.x-dev as 5.0.0" --dev --prefer-source
composer require codeception/module-filesystem:"^3.0" codeception/module-cli:"^2.0" codeception/module-asserts:"^3.0" codeception/module-phpbrowser:"^3.0" --dev
cp c3.php vendor/codeception/codeception/tests/data/claypit
- name: Start PHP Server
run: |
cd vendor/codeception/codeception && php -S 127.0.0.1:8008 -t tests/data/app -d pcov.directory=$(pwd)/tests/data/app >/dev/null 2>&1 &
- name: Run test suite
run: cd vendor/codeception/codeception && php ./codecept run coverage
2 changes: 1 addition & 1 deletion c3.php
Expand Up @@ -121,7 +121,7 @@ class_alias('PHPUnit\Runner\Version', 'PHPUnit_Runner_Version');
ini_set('memory_limit', $requiredMemory);
}

define('C3_CODECOVERAGE_MEDIATE_STORAGE', Codeception\Configuration::logDir() . 'c3tmp');
define('C3_CODECOVERAGE_MEDIATE_STORAGE', Codeception\Configuration::outputDir() . 'c3tmp');
define('C3_CODECOVERAGE_PROJECT_ROOT', Codeception\Configuration::projectDir());
define('C3_CODECOVERAGE_TESTNAME', $_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE']);

Expand Down

0 comments on commit d228302

Please sign in to comment.