Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
WIP #76
Browse files Browse the repository at this point in the history
  • Loading branch information
Rumen Damyanov committed May 5, 2020
1 parent 6e5b981 commit dbe68b5
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 296 deletions.
102 changes: 51 additions & 51 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
name: PHP tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
php-tests:

runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4']

name: PHP ${{ matrix.php-versions }} tests

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, short_open_tag=On
coverage: xdebug
tools: php-cs-fixer, phpunit

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Execute PHPUnit tests
run: vendor/bin/phpunit --configuration phpunit.xml --coverage-text

- name: Upload coverage results to Codeclimate
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
vendor/bin/phpunit tests --coverage-clover build/logs/clover.xml
./cc-test-reporter after-build -t clover --exit-code $?
name: PHP tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
php-tests:

runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4']

name: PHP ${{ matrix.php-versions }} tests

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, short_open_tag=On
coverage: xdebug
tools: php-cs-fixer, phpunit

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Execute PHPUnit tests
run: vendor/bin/phpunit --configuration phpunit.xml --coverage-text

- name: Upload coverage results to Codeclimate
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
vendor/bin/phpunit tests --coverage-clover build/logs/clover.xml
./cc-test-reporter after-build -t clover --exit-code $?
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ Thumbs.db
.php_cs
/.php_cs.cache
/.phpunit.result.cache
.idea/
.idea/
/build
/html
Loading

0 comments on commit dbe68b5

Please sign in to comment.