22
22
strategy :
23
23
fail-fast : false
24
24
matrix :
25
- php-versions : ['7.0', '7.1', '7. 2', '7.3', '7.4', '8.0']
26
- dependencies : ['latest', 'oldest']
25
+ php-versions : ['7.2', '7.3', '7.4', '8.0']
26
+ # dependencies: ['latest', 'oldest'] # Only latest/upwards dependencies supported currently.
27
27
steps :
28
28
- name : Checkout
29
29
uses : actions/checkout@v2
@@ -48,25 +48,38 @@ jobs:
48
48
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
49
49
key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
50
50
restore-keys : ${{ runner.os }}-composer-
51
- - name : Install the lowest dependencies
52
- run : composer update --with-dependencies --prefer-stable --prefer-dist --prefer-lowest
53
- if : ${{ matrix.dependencies }} == "latest"
51
+ # - name: Install the lowest dependencies
52
+ # run: composer update --with-dependencies --prefer-stable --prefer-dist --prefer-lowest
53
+ # if: ${{ matrix.dependencies }} == "latest"
54
54
- name : Install current dependencies from composer.lock
55
55
run : composer install
56
- if : ${{ matrix.dependencies }} == "oldest"
56
+ continue-on-error : ${{matrix.php-versions == '8.0' }} # Temporal until full support for php8 === [temp-php8]
57
57
- name : Set up database schema
58
58
run : mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports['3306'] }} -u${{ env.DB_USERNAME }} -p${{ env.DB_PASSWORD }} ${{ env.DB_DATABASE }} < vendor/phplist/core/resources/Database/Schema.sql
59
+ continue-on-error : ${{matrix.php-versions == '8.0' }} # [temp-php8]
59
60
- name : Validating composer.json
60
61
run : composer validate --no-check-all --no-check-lock --strict;
62
+ continue-on-error : ${{matrix.php-versions == '8.0' }} # [temp-php8]
61
63
- name : Linting all php files
62
64
run : find src/ tests/ public/ -name ''*.php'' -print0 | xargs -0 -n 1 -P 4 php -l; php -l;
63
- - name : Run integration tests with phpunit
64
- run : vendor/bin/phpunit tests/Integration/
65
- - name : Running the system tests
66
- run : vendor/bin/phpunit tests/Integration/;
65
+ - name : Running unit tests
66
+ run : vendor/bin/phpunit tests/Unit/;
67
+ continue-on-error : ${{matrix.php-versions == '8.0' }} # [temp-php8]
68
+ - name : Running the integration tests
69
+ run : |
70
+ export PHPLIST_DATABASE_NAME=${{ env.DB_DATABASE }}
71
+ export PHPLIST_DATABASE_USER=${{ env.DB_USERNAME }}
72
+ export PHPLIST_DATABASE_PASSWORD=${{ env.DB_PASSWORD }}
73
+ export PHPLIST_DATABASE_PORT=${{ job.services.mysql.ports['3306'] }}
74
+ export PHPLIST_DATABASE_HOST=127.0.0.1
75
+ vendor/bin/phpunit tests/Integration/
76
+ continue-on-error : ${{matrix.php-versions == '8.0' }} # [temp-php8]
67
77
- name : Running static analysis
68
78
run : vendor/bin/phpstan analyse -l 5 src/ tests/;
79
+ continue-on-error : ${{matrix.php-versions == '8.0' }} # [temp-php8]
69
80
- name : Running PHPMD
70
81
run : vendor/bin/phpmd src/ text vendor/phplist/core/config/PHPMD/rules.xml;
82
+ continue-on-error : ${{matrix.php-versions == '8.0' }} # [temp-php8]
71
83
- name : Running PHP_CodeSniffer
72
- run : vendor/bin/phpcs --standard=vendor/phplist/core/config/PhpCodeSniffer/ src/ tests/;
84
+ run : vendor/bin/phpcs --standard=vendor/phplist/core/config/PhpCodeSniffer/ src/ tests/;
85
+ continue-on-error : ${{matrix.php-versions == '8.0' }} # [temp-php8]
0 commit comments