diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e4f6953..098d59e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,77 +5,36 @@ jobs: name: ResetPassword runs-on: ubuntu-latest -# services: -# mysql: -# image: mysql:5.7 -# env: -# MYSQL_ALLOW_EMPTY_PASSWORD: false -# MYSQL_ROOT_PASSWORD: password -# ports: -# - 3306 -# options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 strategy: fail-fast: false matrix: php-versions: ['7.2', '7.3', '7.4'] + steps: - name: Checkout uses: actions/checkout@v2.0.0 -# - name: Ping MySQL -# run: | -# while ! mysqladmin ping -h"127.0.0.1" -P"3306" --silent; do -# sleep 1 -# done - -# - name: Test MySQL -# run: | -# mysql -h"127.0.0.1" -P${{ job.services.mysql.ports['3306'] }} -uroot -ppassword -e "SHOW DATABASES" - -# - name: Get Composer Cache Directory -# id: composer-cache -# run: | -# echo "::set-output name=dir::$(composer config cache-files-dir)" -# -# - uses: actions/cache@v1 -# with: -# path: ${{ steps.composer-cache.outputs.dir }} -# # As no lock file is committed, key is composer.json temporarily until artifacts are setup -# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} -# restore-keys: | -# ${{ runner.os }}-composer- - - name: Validate Composer run: composer validate --no-check-lock - name: Install dependencies -# if: steps.composer-cache.outputs.cache-hit != 'true' run: composer install --prefer-dist --no-progress --no-suggest -# -# - name: Create test database -# run: bin/console doctrine:database:create -n -# env: -# DATABASE_URL: mysql://root:password@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/reset_password_bundle_ci?serverVersion=5.7 -# -# - name: Execute migrations -# run: bin/console doctrine:migrations:migrate -n -# env: -# DATABASE_URL: mysql://root:password@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/reset_password_bundle_ci?serverVersion=5.7 -# -# - name: Load fixtures -# run: bin/console doctrine:fixtures:load -n -# env: -# DATABASE_URL: mysql://root:password@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/reset_password_bundle_ci?serverVersion=5.7 - name: Check src with php-cs-Fixer - run: vendor/bin/php-cs-fixer fix --config ./.php_cs.dist --diff --diff-format udiff --dry-run + run: vendor/bin/php-cs-fixer fix --config $GITHUB_WORKSPACE/.php_cs.dist --diff --diff-format udiff --dry-run - name: Psalm Static Analysis - run: vendor/bin/psalm -c psalm.xml + run: vendor/bin/psalm -c $GITHUB_WORKSPACE/psalm.xml if: always() - name: Unit Tests - run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit + if: always() + + - name: Functional Tests + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional + if: always() + + - name: Integration Tests + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration if: always() -# env: -# DATABASE_URL: mysql://root:password@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/reset_password_bundle_ci?serverVersion=5.7 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 152c7011..a5d33c0f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -25,7 +25,7 @@ ./tests/FunctionalTests - ./tests/IntegratonTests + ./tests/IntegrationTests