Skip to content

Commit bb7b0b2

Browse files
committed
Merge branch 'master' of github.com:php-cache/cache
2 parents 4e5593e + 13ce35e commit bb7b0b2

70 files changed

Lines changed: 612 additions & 381 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*.yml]
2+
indent_size = 2

.github/workflows/checks.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Checks
2+
3+
on: pull_request
4+
5+
jobs:
6+
composer-normalize:
7+
name: Composer Normalize
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Set up PHP
12+
uses: shivammathur/setup-php@2.7.0
13+
with:
14+
php-version: 7.4
15+
coverage: none
16+
tools: composer-normalize
17+
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
21+
- name: Normalize
22+
run: |
23+
ok=0
24+
echo ::group::Root
25+
composer-normalize --dry-run
26+
echo ::endgroup::
27+
for PACKAGE in $(find src -maxdepth 4 -type f -name composer.json | sort)
28+
do
29+
echo ::group::$PACKAGE
30+
localExit=0
31+
composer-normalize $PACKAGE --dry-run || localExit=1
32+
ok=$(( $localExit || $ok ))
33+
echo ::endgroup::
34+
if [ $localExit -ne 0 ]; then
35+
echo "::error::$PACKAGE failed"
36+
fi
37+
done
38+
39+
exit $ok

.github/workflows/ci.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: CI
2+
3+
on:
4+
pull_request: ~
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
17+
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+
40+
steps:
41+
- name: Set up PHP
42+
uses: shivammathur/setup-php@2.7.0
43+
with:
44+
php-version: ${{ matrix.php }}
45+
coverage: none
46+
tools: pecl
47+
extensions: redis, memcached, mongodb, apcu, apc
48+
ini-values: apc.enable_cli=1
49+
50+
- name: Checkout code
51+
uses: actions/checkout@v2
52+
53+
- name: Download dependencies
54+
env:
55+
PHP_VERSION: ${{ matrix.php }}
56+
run: |
57+
CURRENT_DIR=$(pwd)
58+
ok=0
59+
for PACKAGE in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
60+
do
61+
echo ::group::$PACKAGE
62+
echo "$CURRENT_DIR/$PACKAGE"
63+
cd "$CURRENT_DIR/$PACKAGE"
64+
65+
localExit=0
66+
if [ $PHP_VERSION = '8.0' ]; then
67+
COMPOSER_OPTIONS=' --ignore-platform-req=php'
68+
fi
69+
composer update --no-interaction --prefer-dist --optimize-autoloader $COMPOSER_OPTIONS || localExit=1
70+
ok=$(( $localExit || $ok ))
71+
echo ::endgroup::
72+
if [ $localExit -ne 0 ]; then
73+
echo "::error::$PACKAGE error"
74+
fi
75+
done
76+
77+
if [ $PHP_VERSION = '5.6' ]; then
78+
exit 0
79+
fi
80+
81+
exit $ok
82+
83+
- name: Run tests
84+
run: |
85+
CURRENT_DIR=$(pwd)
86+
ok=0
87+
for PACKAGE in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
88+
do
89+
echo ::group::$PACKAGE
90+
echo "$CURRENT_DIR/$PACKAGE"
91+
cd "$CURRENT_DIR/$PACKAGE"
92+
93+
localExit=0
94+
./vendor/bin/phpunit 2>&1 || localExit=1
95+
ok=$(( $localExit || $ok ))
96+
echo ::endgroup::
97+
if [ $localExit -ne 0 ]; then
98+
echo "::error::$PACKAGE failed"
99+
fi
100+
done
101+
102+
exit $ok

.github/workflows/static.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Static analysis
2+
3+
on:
4+
pull_request: ~
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
phpstan:
11+
name: PHPStan
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Set up PHP
16+
uses: shivammathur/setup-php@2.7.0
17+
with:
18+
php-version: '7.4'
19+
coverage: none
20+
21+
- name: Checkout code
22+
uses: actions/checkout@v2
23+
24+
- name: Download dependencies
25+
run: |
26+
composer update --no-interaction --prefer-dist --optimize-autoloader
27+
28+
- name: PHPStan
29+
uses: docker://oskarstark/phpstan-ga:0.12.48
30+
with:
31+
entrypoint: /composer/vendor/bin/phpstan
32+
args: analyze --no-progress
33+
34+
psalm:
35+
name: Psalm
36+
runs-on: ubuntu-latest
37+
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+
45+
- name: Checkout code
46+
uses: actions/checkout@v2
47+
48+
- name: Download dependencies
49+
run: |
50+
composer require --dev --no-update psalm/phar:3.16
51+
composer update --no-interaction --prefer-dist
52+
53+
- name: Psalm
54+
run: |
55+
./vendor/bin/psalm.phar --version
56+
./vendor/bin/psalm.phar --output-format=github --no-progress --show-info=false --stats

.gush.yml

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

.travis.yml

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

build/README.md

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

0 commit comments

Comments
 (0)