Skip to content

Commit fbd6281

Browse files
committed
Merge branch 'master' of github.com:splitio/php-client
2 parents e3d3ca5 + bc5baa8 commit fbd6281

File tree

6 files changed

+52
-38
lines changed

6 files changed

+52
-38
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ on:
66
- master
77
push:
88
branches:
9+
- develop
910
- master
1011

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
14+
cancel-in-progress: true
15+
1116
jobs:
1217
build:
1318
name: Build
@@ -18,69 +23,63 @@ jobs:
1823
ports:
1924
- 6379:6379
2025
strategy:
26+
fail-fast: false
2127
matrix:
22-
version: ['7.3', '8.0', '8.1', '8.2']
28+
version:
29+
- '7.3'
30+
- '8.0'
31+
- '8.1'
32+
- '8.2'
2333
steps:
2434
- name: Checkout code
25-
uses: actions/checkout@v2
35+
uses: actions/checkout@v3
36+
with:
37+
fetch-depth: 0
2638

2739
- name: Setup PHP
2840
uses: shivammathur/setup-php@v2
2941
with:
3042
php-version: ${{ matrix.version }}
3143
extensions: mbstring, intl
3244
ini-values: post_max_size=256M, max_execution_time=180
33-
coverage: xdebug
45+
coverage: pcov
3446

3547
- name: Install dependencies
3648
run: |
3749
composer install --prefer-dist
3850
composer update
39-
composer dumpautoload
4051
4152
- name: Build
4253
run: |
4354
vendor/bin/phpcs --ignore=functions.php --standard=PSR2 src/
44-
vendor/bin/phpunit -c phpunit.xml.dist -v --testsuite integration
55+
vendor/bin/phpunit -c phpunit.xml.dist -v --testsuite integration --coverage-clover coverage.xml
4556
46-
sonarqube:
47-
name: Sonarqube
48-
runs-on: ubuntu-latest
49-
steps:
50-
- name: Checkout code
51-
uses: actions/checkout@v2
52-
with:
53-
fetch-depth: 0
57+
- name: Set VERSION env
58+
run: echo "VERSION=$(cat src/SplitIO/Version.php | grep 'const CURRENT' | cut -d "'" -f 2 | sed "s/'//g")" >> $GITHUB_ENV
5459

5560
- name: SonarQube Scan (Push)
56-
if: github.event_name == 'push'
57-
uses: SonarSource/sonarcloud-github-action@v1.5
61+
if: matrix.version == '8.2' && github.event_name == 'push'
62+
uses: SonarSource/sonarcloud-github-action@v1.9
5863
env:
5964
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6066
with:
6167
projectBaseDir: .
6268
args: >
6369
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
64-
-Dsonar.projectName=${{ github.event.repository.name }}
65-
-Dsonar.projectKey=splitsoftware_split-sdk-php
66-
-Dsonar.exclusions="**/tests/**/*.*"
67-
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
68-
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"
70+
-Dsonar.projectVersion=${{ env.VERSION }}
6971
7072
- name: SonarQube Scan (Pull Request)
71-
if: github.event_name == 'pull_request'
72-
uses: SonarSource/sonarcloud-github-action@v1.5
73+
if: matrix.version == '8.2' && github.event_name == 'pull_request'
74+
uses: SonarSource/sonarcloud-github-action@v1.9
7375
env:
7476
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7578
with:
7679
projectBaseDir: .
7780
args: >
7881
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
79-
-Dsonar.projectName=${{ github.event.repository.name }}
80-
-Dsonar.projectKey=splitsoftware_split-sdk-php
81-
-Dsonar.exclusions="**/tests/**/*.*"
82-
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
83-
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"
82+
-Dsonar.projectVersion=${{ env.VERSION }}
8483
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
8584
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
8685
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}

.github/workflows/update-license-year.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
uses: actions/checkout@v2
1717
with:
1818
fetch-depth: 0
19-
19+
2020
- name: Set Current year
2121
run: "echo CURRENT=$(date +%Y) >> $GITHUB_ENV"
22-
22+
2323
- name: Set Previous Year
2424
run: "echo PREVIOUS=$(($CURRENT-1)) >> $GITHUB_ENV"
2525

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ test.php
2626

2727
# Sonarqube
2828
.scannerwork
29+
30+
# Tests
31+
.phpunit.result.cache
32+
coverage.xml

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ Please see [Contributors Guide](CONTRIBUTORS-GUIDE.md) to find all you need to s
4141
Licensed under the Apache License, Version 2.0. See: [Apache License](http://www.apache.org/licenses/).
4242

4343
## About Split
44-
44+
4545
Split is the leading Feature Delivery Platform for engineering teams that want to confidently deploy features as fast as they can develop them. Split’s fine-grained management, real-time monitoring, and data-driven experimentation ensure that new features will improve the customer experience without breaking or degrading performance. Companies like Twilio, Salesforce, GoDaddy and WePay trust Split to power their feature delivery.
46-
46+
4747
To learn more about Split, contact hello@split.io, or get started with feature flags for free at https://www.split.io/signup.
48-
48+
4949
Split has built and maintains SDKs for:
50-
50+
5151
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
5252
* Javascript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
5353
* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
@@ -58,9 +58,9 @@ Split has built and maintains SDKs for:
5858
* GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)
5959
* Android [Github](https://github.com/splitio/android-client) [Docs](https://help.split.io/hc/en-us/articles/360020343291-Android-SDK)
6060
* iOS [Github](https://github.com/splitio/ios-client) [Docs](https://help.split.io/hc/en-us/articles/360020401491-iOS-SDK)
61-
61+
6262
For a comprehensive list of open source projects visit our [Github page](https://github.com/splitio?utf8=%E2%9C%93&query=%20only%3Apublic%20).
63-
63+
6464
**Learn more about Split:**
65-
65+
6666
Visit [split.io/product](https://www.split.io/product) for an overview of Split, or visit our documentation at [help.split.io](http://help.split.io) for more detailed information.

phpunit.xml.dist

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
<const name="TEST_PREFIX" value="SPLITIO_TEST:."/>
99
</php>
1010

11+
<filter>
12+
<whitelist>
13+
<directory suffix=".php">src</directory>
14+
</whitelist>
15+
</filter>
16+
1117
<testsuites>
1218
<testsuite name="splitio">
1319
<directory suffix="Test.php">tests/</directory>
@@ -46,8 +52,6 @@
4652
<directory suffix="Test.php">tests/Suite/Sdk/</directory>
4753
</testsuite>
4854

49-
50-
5155
<testsuite name="integration">
5256
<directory suffix="Test.php">tests/Suite/Adapter/</directory>
5357
<directory suffix="Test.php">tests/Suite/Attributes/</directory>

sonar-project.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
sonar.projectName=php-client
2+
sonar.projectKey=splitsoftware_split-sdk-php
3+
sonar.sources=src
4+
sonar.tests=tests
5+
sonar.php.coverage.reportPaths=coverage.xml
6+
sonar.links.ci=https://github.com/splitio/php-client
7+
sonar.links.scm=https://github.com/splitio/php-client/actions

0 commit comments

Comments
 (0)