Skip to content

Commit

Permalink
Releasing 0.4.1 into master (#4)
Browse files Browse the repository at this point in the history
* Update README.md

* merge into develop

* Apply fixes from StyleCI

* should be master

* min php 7.0

* adds support for custom error messages

* update readme

* fix rule merging

* refactor validator again

* Apply fixes from StyleCI

* Update composer.json

* be careful

* Apply fixes from StyleCI

* update

* Create unit-tests.yml

* Create bundler.yml

* Create release-drafter.yml

* draft

* db tests

* Update unit-tests.yml

* Update unit-tests.yml

* Setting release dependencies

Co-authored-by: Romans Malinovskis <me@nearly.guru>
Co-authored-by: Imants Horsts <DarkSide666@users.noreply.github.com>
Co-authored-by: GitHub Web Flow <noreply@github.com>
  • Loading branch information
4 people committed Feb 11, 2020
1 parent 7b12e57 commit 14b5ee5
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 3 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ jobs:
strategy:
matrix:
php: ['7.2', '7.3', 'latest']
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
DB_DATABASE: dsql_test
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
postgres:
image: postgres:10-alpine
env:
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v1
# need this to trick composer
Expand All @@ -39,12 +52,23 @@ jobs:
- name: Run Tests
run: |
mkdir -p build/logs
mysql -uroot -ppassword -h mysql -e 'CREATE DATABASE dsql_test;'
PGPASSWORD=password psql -h postgres -c 'create database "atk4-dsql-test";' -U postgres
- name: SQLite Testing
run: vendor/bin/phpunit --configuration phpunit.xml --coverage-text
run: vendor/bin/phpunit --configuration phpunit.xml --coverage-text --exclude-group dns

- name: MySQL Testing
run: vendor/bin/phpunit --configuration phpunit-mysql-workflow.xml --exclude-group dns

- name: PgSQL Testing
run: vendor/bin/phpunit --configuration phpunit-pgsql-workflow.xml --exclude-group dns

- name: Merge coverage logs
run: vendor/bin/phpcov merge build/logs/ --clover build/logs/cc.xml;

- uses: codecov/codecov-action@v1
if: matrix.php == 'latest'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: build/logs/clover.xml
file: build/logs/cc.xml
24 changes: 24 additions & 0 deletions phpunit-mysql-workflow.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<phpunit colors="true" bootstrap="vendor/autoload.php" printerClass="atk4\core\PHPUnit_AgileResultPrinter">
<php>
<var name="DB_DSN" value="mysql:dbname=dsql_test;host=mysql" />
<var name="DB_USER" value="root" />
<var name="DB_PASSWD" value="password" />
<var name="DB_DBNAME" value="dsql_test" />
</php>
<testsuites>
<testsuite name="tests">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<blacklist>
<directory suffix=".php">./vendor</directory>
</blacklist>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-php" target="build/logs/clover-mysql.cov"/>
</logging>
</phpunit>
24 changes: 24 additions & 0 deletions phpunit-pgsql-workflow.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<phpunit colors="true" bootstrap="vendor/autoload.php" printerClass="atk4\core\PHPUnit_AgileResultPrinter">
<php>
<var name="DB_DSN" value="pgsql:dbname=atk4-dsql-test;host=postgres" />
<var name="DB_USER" value="postgres" />
<var name="DB_PASSWD" value="password" />
<var name="DB_DBNAME" value="atk4-dsql-test" />
</php>
<testsuites>
<testsuite name="tests">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<blacklist>
<directory suffix=".php">./vendor</directory>
</blacklist>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-php" target="build/logs/clover-pgsql.cov"/>
</logging>
</phpunit>
2 changes: 1 addition & 1 deletion phpunit-pgsql.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<php>
<var name="DB_DSN" value="pgsql:dbname=atk4-dsql-test;host=localhost" />
<var name="DB_USER" value="postgres" />
<var name="DB_PASSWD" value="" />
<var name="DB_PASSWD" value="password" />
<var name="DB_DBNAME" value="atk4-dsql-test" />
</php>
<filter>
Expand Down

0 comments on commit 14b5ee5

Please sign in to comment.