Skip to content

Commit c7f3743

Browse files
authored
Removed workflow not needed (#241)
1 parent a18a9be commit c7f3743

File tree

7 files changed

+57
-73
lines changed

7 files changed

+57
-73
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,49 +15,47 @@ jobs:
1515
matrix:
1616
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
1717

18+
services:
19+
redis:
20+
image: redis:6.0.0
21+
ports:
22+
- 6379:6379
23+
redis-cluster:
24+
image: grokzen/redis-cluster:5.0.4
25+
ports:
26+
- 7000:7000
27+
- 7001:7001
28+
- 7002:7002
29+
env:
30+
STANDALONE: 1
31+
memcached:
32+
image: memcached:1.6.5
33+
ports:
34+
- 11211:11211
35+
mongodb:
36+
image: mongo
37+
ports:
38+
- 27017:27017
39+
1840
steps:
1941
- name: Set up PHP
2042
uses: shivammathur/[email protected]
2143
with:
2244
php-version: ${{ matrix.php }}
2345
coverage: none
46+
tools: pecl
47+
extensions: redis, memcached, mongodb, apcu, apc
48+
ini-values: apc.enable_cli=1
2449

2550
- name: Checkout code
2651
uses: actions/checkout@v2
2752

28-
- name: Download phpunit
29-
run: |
30-
rm composer.*
31-
composer init --no-interaction --name "php-cache/cache"
32-
33-
echo ::group::Download
34-
composer require symfony/phpunit-bridge
35-
echo ::endgroup::
36-
37-
echo ::group::Install
38-
./vendor/bin/simple-phpunit install
39-
echo ::endgroup::
40-
41-
- name: Modify composer.json
42-
run: |
43-
CURRENT_DIR=$(pwd)
44-
for PACKAGE in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
45-
do
46-
echo ::group::mi$PACKAGE
47-
echo "$CURRENT_DIR/$PACKAGE"
48-
cd "$CURRENT_DIR/$PACKAGE"
49-
50-
sed -i -re 's/"require": \{/"minimum-stability": "dev","prefer-stable": true,"require": \{/' composer.json
51-
cat composer.json
52-
53-
echo ::endgroup::
54-
done
55-
5653
- name: Download dependencies
5754
env:
5855
PHP_VERSION: ${{ matrix.php }}
5956
run: |
6057
CURRENT_DIR=$(pwd)
58+
ok=0
6159
for PACKAGE in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
6260
do
6361
echo ::group::$PACKAGE
@@ -69,21 +67,31 @@ jobs:
6967
COMPOSER_OPTIONS=' --ignore-platform-req=php'
7068
fi
7169
composer update --no-interaction --prefer-dist --optimize-autoloader $COMPOSER_OPTIONS || localExit=1
70+
ok=$(( $localExit || $ok ))
7271
echo ::endgroup::
7372
if [ $localExit -ne 0 ]; then
7473
echo "::error::$PACKAGE error"
75-
exit $localExit
7674
fi
7775
done
7876
77+
if [ $PHP_VERSION = '5.6' ]; then
78+
exit 0
79+
fi
80+
81+
exit $ok
82+
7983
- name: Run tests
8084
run: |
85+
CURRENT_DIR=$(pwd)
8186
ok=0
8287
for PACKAGE in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
8388
do
8489
echo ::group::$PACKAGE
90+
echo "$CURRENT_DIR/$PACKAGE"
91+
cd "$CURRENT_DIR/$PACKAGE"
92+
8593
localExit=0
86-
./vendor/bin/simple-phpunit -c ./$PACKAGE 2>&1 || localExit=1
94+
./vendor/bin/phpunit 2>&1 || localExit=1
8795
ok=$(( $localExit || $ok ))
8896
echo ::endgroup::
8997
if [ $localExit -ne 0 ]; then

.github/workflows/php.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/static.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,22 @@ jobs:
3535
name: Psalm
3636
runs-on: ubuntu-latest
3737
steps:
38+
- name: Set up PHP
39+
uses: shivammathur/setup-php@v2
40+
with:
41+
php-version: '7.4'
42+
extensions: redis, memcached, apcu
43+
tools: composer:v2
44+
3845
- name: Checkout code
3946
uses: actions/checkout@v2
4047

48+
- name: Download dependencies
49+
run: |
50+
composer require --dev --no-update psalm/phar:3.16
51+
composer update --no-interaction --prefer-dist
52+
4153
- name: Psalm
42-
uses: docker://vimeo/psalm-github-actions:3.17.2
43-
with:
44-
args: --no-progress --show-info=false --stats
54+
run: |
55+
./vendor/bin/psalm.phar --version
56+
./vendor/bin/psalm.phar --output-format=github --no-progress --show-info=false --stats

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<directory name="src" />
1212
<ignoreFiles>
1313
<directory name="src/Adapter/*/Tests" />
14+
<directory name="src/Adapter/MongoDB" />
1415
<directory name="src/Bridge/*/Tests" />
1516
<directory name="src/Encryption/Tests" />
1617
<directory name="src/Hierarchy/Tests" />

src/Adapter/Apcu/Tests/IntegrationPoolTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class IntegrationPoolTest extends BaseTest
2424

2525
public function createCachePool()
2626
{
27-
if (defined('HHVM_VERSION') || !function_exists('apcu_store')) {
27+
if (defined('HHVM_VERSION') || !function_exists('apcu_store') || (function_exists('apcu_enabled') && !apcu_enabled())) {
2828
$this->markTestSkipped();
2929
}
3030

src/Adapter/Apcu/Tests/IntegrationSimpleCachelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class IntegrationSimpleCachelTest extends BaseTest
1818
{
1919
public function createSimpleCache()
2020
{
21-
if (defined('HHVM_VERSION') || !function_exists('apcu_store')) {
21+
if (defined('HHVM_VERSION') || !function_exists('apcu_store') || (function_exists('apcu_enabled') && !apcu_enabled())) {
2222
$this->markTestSkipped();
2323
}
2424

src/Adapter/Apcu/Tests/IntegrationTagTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class IntegrationTagTest extends TaggableCachePoolTest
1818
{
1919
public function createCachePool()
2020
{
21-
if (defined('HHVM_VERSION') || !function_exists('apcu_store')) {
21+
if (defined('HHVM_VERSION') || !function_exists('apcu_store') || (function_exists('apcu_enabled') && !apcu_enabled())) {
2222
$this->markTestSkipped();
2323
}
2424

0 commit comments

Comments
 (0)