|
5 | 5 | name: ResetPassword
|
6 | 6 | runs-on: ubuntu-latest
|
7 | 7 |
|
8 |
| -# services: |
9 |
| -# mysql: |
10 |
| -# image: mysql:5.7 |
11 |
| -# env: |
12 |
| -# MYSQL_ALLOW_EMPTY_PASSWORD: false |
13 |
| -# MYSQL_ROOT_PASSWORD: password |
14 |
| -# ports: |
15 |
| -# - 3306 |
16 |
| -# options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 |
17 | 8 | strategy:
|
18 | 9 | fail-fast: false
|
19 | 10 | matrix:
|
20 | 11 | php-versions: ['7.2', '7.3', '7.4']
|
| 12 | + |
21 | 13 | steps:
|
22 | 14 | - name: Checkout
|
23 | 15 | uses: actions/checkout@v2.0.0
|
24 | 16 |
|
25 |
| -# - name: Ping MySQL |
26 |
| -# run: | |
27 |
| -# while ! mysqladmin ping -h"127.0.0.1" -P"3306" --silent; do |
28 |
| -# sleep 1 |
29 |
| -# done |
30 |
| - |
31 |
| -# - name: Test MySQL |
32 |
| -# run: | |
33 |
| -# mysql -h"127.0.0.1" -P${{ job.services.mysql.ports['3306'] }} -uroot -ppassword -e "SHOW DATABASES" |
34 |
| - |
35 |
| -# - name: Get Composer Cache Directory |
36 |
| -# id: composer-cache |
37 |
| -# run: | |
38 |
| -# echo "::set-output name=dir::$(composer config cache-files-dir)" |
39 |
| -# |
40 |
| -# - uses: actions/cache@v1 |
41 |
| -# with: |
42 |
| -# path: ${{ steps.composer-cache.outputs.dir }} |
43 |
| -# # As no lock file is committed, key is composer.json temporarily until artifacts are setup |
44 |
| -# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} |
45 |
| -# restore-keys: | |
46 |
| -# ${{ runner.os }}-composer- |
47 |
| - |
48 | 17 | - name: Validate Composer
|
49 | 18 | run: composer validate --no-check-lock
|
50 | 19 |
|
51 | 20 | - name: Install dependencies
|
52 |
| -# if: steps.composer-cache.outputs.cache-hit != 'true' |
53 | 21 | run: composer install --prefer-dist --no-progress --no-suggest
|
54 |
| -# |
55 |
| -# - name: Create test database |
56 |
| -# run: bin/console doctrine:database:create -n |
57 |
| -# env: |
58 |
| -# DATABASE_URL: mysql://root:password@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/reset_password_bundle_ci?serverVersion=5.7 |
59 |
| -# |
60 |
| -# - name: Execute migrations |
61 |
| -# run: bin/console doctrine:migrations:migrate -n |
62 |
| -# env: |
63 |
| -# DATABASE_URL: mysql://root:password@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/reset_password_bundle_ci?serverVersion=5.7 |
64 |
| -# |
65 |
| -# - name: Load fixtures |
66 |
| -# run: bin/console doctrine:fixtures:load -n |
67 |
| -# env: |
68 |
| -# DATABASE_URL: mysql://root:password@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/reset_password_bundle_ci?serverVersion=5.7 |
69 | 22 |
|
70 | 23 | - name: Check src with php-cs-Fixer
|
71 |
| - run: vendor/bin/php-cs-fixer fix --config ./.php_cs.dist --diff --diff-format udiff --dry-run |
| 24 | + run: vendor/bin/php-cs-fixer fix --config $GITHUB_WORKSPACE/.php_cs.dist --diff --diff-format udiff --dry-run |
72 | 25 |
|
73 | 26 | - name: Psalm Static Analysis
|
74 |
| - run: vendor/bin/psalm -c psalm.xml |
| 27 | + run: vendor/bin/psalm -c $GITHUB_WORKSPACE/psalm.xml |
75 | 28 | if: always()
|
76 | 29 |
|
77 | 30 | - name: Unit Tests
|
78 |
| - run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist |
| 31 | + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit |
| 32 | + if: always() |
| 33 | + |
| 34 | + - name: Functional Tests |
| 35 | + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional |
| 36 | + if: always() |
| 37 | + |
| 38 | + - name: Integration Tests |
| 39 | + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration |
79 | 40 | if: always()
|
80 |
| -# env: |
81 |
| -# DATABASE_URL: mysql://root:password@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/reset_password_bundle_ci?serverVersion=5.7 |
0 commit comments