Skip to content

Commit

Permalink
Add a GitHub Actions build for oci8
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Jul 21, 2020
1 parent 0b482cd commit f6ac26f
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,45 @@ jobs:

- name: "Run squizlabs/php_codesniffer"
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"

phpunit-oci8:
name: "PHPUnit on OCI8"
runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"

services:
oracle:
image: "wnameless/oracle-xe-11g-r2"
ports:
- "1521:1521"

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

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "oci8"
coverage: "pcov"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v1"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"

- name: "Install dependencies with composer"
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit -c ci/github/phpunit.oci8.xml --coverage-clover=coverage.xml"

- name: "Upload Code Coverage"
uses: "codecov/codecov-action@v1"
44 changes: 44 additions & 0 deletions ci/github/phpunit.oci8.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />

<var name="db_driver" value="oci8"/>
<var name="db_host" value="localhost" />
<var name="db_user" value="DOCTRINE" />
<var name="db_password" value="ORACLE" />
<var name="db_dbname" value="XE" />
<var name="db_event_subscribers" value="Doctrine\DBAL\Event\Listeners\OracleSessionInit"/>

<var name="tmpdb_driver" value="oci8"/>
<var name="tmpdb_host" value="localhost" />
<var name="tmpdb_user" value="SYSTEM" />
<var name="tmpdb_password" value="ORACLE" />
<var name="tmpdb_dbname" value="XE" />
</php>

<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../../tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">../../lib</directory>
</whitelist>
</filter>

<groups>
<exclude>
<group>performance</group>
</exclude>
</groups>
</phpunit>

0 comments on commit f6ac26f

Please sign in to comment.