Skip to content
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
65 changes: 12 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<directory>./tests/FunctionalTests</directory>
</testsuite>
<testsuite name="integration">
<directory>./tests/IntegratonTests</directory>
<directory>./tests/IntegrationTests</directory>
</testsuite>
</testsuites>

Expand Down