Skip to content

Commit 51f899d

Browse files
committed
Add GitHub Actions
1 parent bb056d8 commit 51f899d

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ Makefile text
2424
/*.xml.dist export-ignore
2525
/phpstan.neon export-ignore
2626
/psalm.xml export-ignore
27+
/.github export-ignore

.github/workflows/validate.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on:
2+
pull_request:
3+
branches: [ $default-branch ]
4+
5+
jobs:
6+
analyze:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- &setup-php
11+
name: Setup PHP with PECL extension
12+
uses: shivammathur/setup-php@v2
13+
with:
14+
php-version: '8.0'
15+
extensions: intl, mbstring
16+
coverage: xdebug
17+
- &composer-cache
18+
name: Cache Composer packages
19+
id: composer-cache
20+
uses: actions/cache@v2
21+
with:
22+
path: vendor
23+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.json,') }}
24+
restore-keys: |
25+
${{ runner.os }}-php-
26+
- name: Validate code
27+
run: make analyze
28+
29+
unit-test:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v2
33+
- *setup-php
34+
- *composer-cache
35+
- name: Run unit test
36+
id: make-test
37+
run: make test
38+
39+
coverage:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v2
43+
- *setup-php
44+
- *composer-cache
45+
- name: Code coverage
46+
run: make coverage

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Added
1010

1111
- Support from JSON document (require RediSearch 2.2)
12+
- (dev) GitHub Actions
1213

1314
### Fixed
1415

1516
- (dev) Code coverage with XDebug 3
17+
- (dev) Defined list of allowed Composer plugins
1618

1719
## [2.0.2]
1820

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"respect/validation": "^2.0"
2323
},
2424
"require-dev": {
25+
"ext-mbstring": "*",
2526
"amphp/redis": "^1.0",
2627
"cheprasov/php-redis-client": "^1.10",
2728
"colinmollenhour/credis": "^1.12",
@@ -54,6 +55,12 @@
5455
"ptrofimov/tinyredisclient": "To use TinyRedisClient implementation",
5556
"redisent/redisent": "To use Redisent implementation"
5657
},
58+
"config": {
59+
"allow-plugins": {
60+
"composer/package-versions-deprecated": true,
61+
"ergebnis/composer-normalize": true
62+
}
63+
},
5764
"autoload": {
5865
"psr-4": {
5966
"MacFJA\\RediSearch\\": "src/"

0 commit comments

Comments
 (0)