This repository has been archived by the owner on Dec 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f332222
commit 7fad851
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
coverage_clover: clover.xml | ||
json_path: coveralls-upload.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: ci | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: ['ubuntu-latest'] | ||
php-versions: ['7.4'] | ||
coveralls: [false] | ||
include: | ||
- operating-system: 'ubuntu-latest' | ||
php-versions: '7.4' | ||
coveralls: true | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
tools: composer:v1 | ||
coverage: xdebug | ||
|
||
- name: Install Composer dependencies | ||
run: composer install | ||
|
||
- name: Linting code | ||
run: ./vendor/bin/phing lint | ||
|
||
- name: Codesniffer | ||
run: ./vendor/bin/phing sniff | ||
|
||
- name: Static code analysis | ||
run: ./vendor/bin/phing analyse | ||
|
||
- name: Magerun | ||
if: matrix.coveralls == false | ||
run: | | ||
wget https://files.magerun.net/n98-magerun2-latest.phar | ||
mkdir -p ~/.n98-magerun2/modules | ||
ln -s $(pwd) ~/.n98-magerun2/modules/magerun2-list-api-endpoints | ||
php n98-magerun2-latest.phar help api:list:endpoints | ||
- name: Unittests | ||
if: matrix.coveralls == false | ||
run: ./vendor/bin/phing unit | ||
|
||
- name: Unittests with coverage | ||
if: matrix.coveralls == true | ||
run: ./vendor/bin/phing unit-with-coverage | ||
|
||
- name: Coveralls report | ||
if: matrix.coveralls == true | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
composer require php-coveralls/php-coveralls | ||
./vendor/bin/php-coveralls --coverage_clover=clover.xml -v |