Skip to content

Commit a209ff7

Browse files
authored
Merge pull request #77 from jrushlow/ci
improve CI
2 parents a03d8ea + 9087b33 commit a209ff7

File tree

2 files changed

+13
-54
lines changed

2 files changed

+13
-54
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -5,77 +5,36 @@ jobs:
55
name: ResetPassword
66
runs-on: ubuntu-latest
77

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
178
strategy:
189
fail-fast: false
1910
matrix:
2011
php-versions: ['7.2', '7.3', '7.4']
12+
2113
steps:
2214
- name: Checkout
2315
uses: actions/checkout@v2.0.0
2416

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-
4817
- name: Validate Composer
4918
run: composer validate --no-check-lock
5019

5120
- name: Install dependencies
52-
# if: steps.composer-cache.outputs.cache-hit != 'true'
5321
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
6922

7023
- 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
7225

7326
- name: Psalm Static Analysis
74-
run: vendor/bin/psalm -c psalm.xml
27+
run: vendor/bin/psalm -c $GITHUB_WORKSPACE/psalm.xml
7528
if: always()
7629

7730
- 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
7940
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

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<directory>./tests/FunctionalTests</directory>
2626
</testsuite>
2727
<testsuite name="integration">
28-
<directory>./tests/IntegratonTests</directory>
28+
<directory>./tests/IntegrationTests</directory>
2929
</testsuite>
3030
</testsuites>
3131

0 commit comments

Comments
 (0)