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

#20 - Refactor CLI #70

Merged
merged 40 commits into from
Mar 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
19fb1e7
#20 - Remove loadUserScripts() method
Jeckerson Mar 14, 2020
bd51583
#20 - Move showing help into Migration Command class
Jeckerson Mar 14, 2020
30e4283
#20 - Add phalcon/cli-options-parser package
Jeckerson Mar 14, 2020
071943c
#20 - Merge Console\Script class
Jeckerson Mar 14, 2020
b7b04d0
#20 - Move out Migration class from Builtin directory
Jeckerson Mar 14, 2020
6eb7831
#20 - Remove getRequiredParams() method
Jeckerson Mar 14, 2020
55f465d
#20 - Remove countOptions() method
Jeckerson Mar 14, 2020
cc1b06b
#20 - Refactor Migration Command
Jeckerson Mar 14, 2020
8c62a8b
#20 - Merge abstract class with Migration Command
Jeckerson Mar 14, 2020
9ee8dbc
#20 - Remove getCommands() method
Jeckerson Mar 14, 2020
85b3b85
#20 - Refactor config file path declaration
Jeckerson Mar 14, 2020
ca0ca5a
#20 - Update composer.lock
Jeckerson Mar 14, 2020
bbe5190
#20 - Update composer dependencies
Jeckerson Mar 16, 2020
9f4df9e
#20 - Integrate Codeception skeleton
Jeckerson Mar 16, 2020
9a5ba45
#20 - Adapt Unit tests to Codeception
Jeckerson Mar 16, 2020
a2b97a4
#20 - Adapt Integration tests
Jeckerson Mar 16, 2020
85478ce
#20 - Adapt first MySQL test
Jeckerson Mar 16, 2020
5ef3755
#20 - Fix Integration Helper
Jeckerson Mar 16, 2020
5bdebea
#20 - Rewrite Mysql and Postgresql tests
Jeckerson Mar 17, 2020
4926039
#20 - Move GenerateCest to integration/ folder
Jeckerson Mar 17, 2020
b8ef2d3
#20 - Remove phpunit.xml.dist
Jeckerson Mar 17, 2020
5c7ae72
#20 - Add workflow step to copy .env file
Jeckerson Mar 17, 2020
35fc299
#20 - Change run tests command
Jeckerson Mar 17, 2020
3e16c5f
#20 - Update composer.lock
Jeckerson Mar 17, 2020
3a5c1ae
#20 - Fix folders path in phpcs.xml.dist
Jeckerson Mar 17, 2020
8bab3ec
#20 - Change user and password values to dynamic
Jeckerson Mar 17, 2020
804e99b
#20 - Add port into dsn
Jeckerson Mar 17, 2020
6bcc032
#20 - Rename Unit/ to unit-old/ folder
Jeckerson Mar 17, 2020
5cc58d2
#20 - Rename unit-old/ to unit/ folder
Jeckerson Mar 17, 2020
78956c0
#20 - Enable test coverage
Jeckerson Mar 17, 2020
007ac83
#20 - Implement cli suite with first basic tests
Jeckerson Mar 17, 2020
0769f75
#20 - Update BasicCest test
Jeckerson Mar 18, 2020
96bdb31
Merge branch 'master' into feature/#20-cli-options-parser
Jeckerson Mar 18, 2020
f160582
#20 - Remove Path class with its BuilderException
Jeckerson Mar 18, 2020
fc94ed1
#20 - Refactor and unify some of Exceptions
Jeckerson Mar 18, 2020
e8954a5
#20 - Implement more CLI tests
Jeckerson Mar 18, 2020
2f62785
#20 - Bump min version of Phalcon to 4.0.5
Jeckerson Mar 18, 2020
e5c15b1
#20 - Disable recursive scan to find config file
Jeckerson Mar 18, 2020
f75b3ee
#20 - Change Phalcon extension to 4.0.5 version
Jeckerson Mar 19, 2020
8f6f403
#20 - Change Phalcon extension to 4.0.5 version
Jeckerson Mar 19, 2020
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
13 changes: 8 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
name: PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
env:
extensions: mbstring, intl, json, phalcon4, mysql, pgsql
key: cache-v1.2
extensions: mbstring, intl, json, phalcon-4.0.5, mysql, pgsql, xdebug
key: cache-v2.0
services:
mysql:
image: mysql:5.7
Expand Down Expand Up @@ -66,16 +66,19 @@ jobs:
- name: Install Composer dependencies
run: composer install --prefer-dist --no-suggest

- name: Run test suite
- name: Copy .env file
run: cp tests/.env.example tests/.env

- name: Run test suites
env:
MYSQL_TEST_DB_PORT: ${{ job.services.mysql.ports['3306'] }}
POSTGRES_TEST_DB_PORT: ${{ job.services.postgres.ports['5432'] }}
if: success()
run: vendor/bin/phpunit --coverage-clover=coverage.xml
run: vendor/bin/codecept run --coverage-xml=coverage-${{ matrix.php-versions }}.xml

- name: Upload coverage to Codecov
if: success()
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.xml
file: ./tests/_output/coverage-*.xml
2 changes: 1 addition & 1 deletion .github/workflows/validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
name: Static Code with PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
env:
extensions: mbstring, intl, json, phalcon4
extensions: mbstring, intl, json, phalcon-4.0.5
key: cache-v1.2
needs: validate-code-style
strategy:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
composer.phar
/vendor/
.env
17 changes: 17 additions & 0 deletions codeception.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
paths:
tests: tests
output: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
actor_suffix: Tester
bootstrap: bootstrap.php
extensions:
enabled:
- Codeception\Extension\RunFailed
params:
- tests/.env
coverage:
enabled: true
include:
- src/*
32 changes: 19 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"name": "phalcon/migrations",
"description": "Run and Generate DB Migrations with Phalcon Framework",
"keywords": ["framework", "phalcon", "migration", "phar"],
"keywords": [
"framework",
"phalcon",
"migration",
"phar"
],
"homepage": "https://phalcon.io",
"license": "BSD-3-Clause",
"authors": [
Expand All @@ -22,29 +27,28 @@
},
"require": {
"php": ">=7.2",
"ext-phalcon": "^4.0.0"
"ext-phalcon": "^4.0.5",
"phalcon/cli-options-parser": "^1.2"
},
"require-dev": {
"phpunit/phpunit": "8.4.1",
"ext-pdo": "*",
"phalcon/ide-stubs": "^4.0.0",
"vimeo/psalm": "3.6.2",
"squizlabs/php_codesniffer": "3.5.1",
"fzaninotto/faker": "^1.9",
"humbug/box": "^3.8"
"humbug/box": "^3.8",
"codeception/codeception": "^4.1",
"codeception/module-asserts": "^1.0.0",
"codeception/module-cli": "^1.0",
"codeception/module-phpbrowser": "^1.0.0",
"codeception/module-db": "^1.0",
"vlucas/phpdotenv": "^4.1"
},
"autoload": {
"psr-4": {
"Phalcon\\Migrations\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Phalcon\\Migrations\\Tests\\": "tests/"
},
"files": [
"tests/Helpers.php"
]
},
"suggest": {
"robmorgan/phinx": "Phinx makes it ridiculously easy to manage the database migrations for your PHP app."
},
Expand All @@ -61,5 +65,7 @@
"psalm.xml.dist"
]
},
"bin": ["phalcon-migrations"]
"bin": [
"phalcon-migrations"
]
}
Loading