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

Test /w Oracle 18c #1729

Merged
merged 2 commits into from
Jan 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ jobs:
ACCEPT_EULA: Y
SA_PASSWORD: atk4_pass
oracle:
image: ghcr.io/mvorisek/docker-oracle-xe-11g
image: gvenzl/oracle-xe:18
env:
ORACLE_ALLOW_REMOTE: true
ORACLE_PASSWORD: atk4_pass
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -196,18 +196,16 @@ jobs:
php -d opcache.enable_cli=1 vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) -v
if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-mssql.cov; fi

- name: "Run tests: Oracle (only for coverage or cron)"
if: env.LOG_COVERAGE || github.event_name == 'schedule'
- name: "Run tests: Oracle"
env:
DB_DSN: "oci:dbname=oracle/xe"
DB_USER: system
DB_PASSWORD: oracle
DB_PASSWORD: atk4_pass
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
run: |
sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
php demos/_demo-data/create-db.php
php -d opcache.enable_cli=1 vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) -v \
|| php -d opcache.enable_cli=1 vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) -v
php -d opcache.enable_cli=1 vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) -v
if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-oracle.cov; fi

- name: Upload coverage logs 1/2 (only for latest Phpunit)
Expand Down Expand Up @@ -260,9 +258,9 @@ jobs:
ACCEPT_EULA: Y
SA_PASSWORD: atk4_pass
oracle:
image: ghcr.io/mvorisek/docker-oracle-xe-11g
image: gvenzl/oracle-xe:18
env:
ORACLE_ALLOW_REMOTE: true
ORACLE_PASSWORD: atk4_pass
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -406,13 +404,12 @@ jobs:
env:
DB_DSN: "oci:dbname=oracle/xe"
DB_USER: system
DB_PASSWORD: oracle
DB_PASSWORD: atk4_pass
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
run: |
sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
php demos/_demo-data/create-db.php
vendor/bin/behat -vv --config behat.yml.dist \
|| vendor/bin/behat -vv --config behat.yml.dist
vendor/bin/behat -vv --config behat.yml.dist

- name: Upload coverage logs 1/2 (only for latest Chrome)
if: env.LOG_COVERAGE
Expand Down
5 changes: 5 additions & 0 deletions demos/init-db.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,11 @@ public function importFromFilesystem(string $path, bool $isSub = null): void
$this->atomic(function () use ($path) {
foreach ($this as $entity) {
$entity->delete();

// skip full/slow import for Behat testing
if ($_ENV['CI'] ?? null) {
break;
}
}

$path = __DIR__ . '/../' . $path;
Expand Down