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

Commit

Permalink
Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wggdeveloper committed Mar 24, 2021
1 parent 477e2e1 commit d2b7458
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 6 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/php-stan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Static analysis
on:
push:
pull_request:

jobs:
phpstan:
strategy:
matrix:
php: [ '7.4' ]
runs-on: ubuntu-latest
env:
extensions: json
steps:
- name: Setup PHP cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
key: php-extension-cache-v1
- name: Cache extensions
uses: actions/cache@v2
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: ${{ env.extensions }}
ini-values: memory_limit=-1
php-version: "${{ matrix.php }}"
tools: pecl, composer
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Repository checkout
uses: actions/checkout@v2
- name: PHPStan
run: composer run-script phpstan
48 changes: 48 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Tests
on:
push:
pull_request:

jobs:
phpunit:
strategy:
matrix:
php: [ '7.4' ]
runs-on: ubuntu-latest
env:
extensions: json
steps:
- name: Setup PHP cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
key: php-extension-cache-v1
- name: Cache extensions
uses: actions/cache@v2
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: ${{ env.extensions }}
ini-values: memory_limit=-1
php-version: "${{ matrix.php }}"
tools: pecl, composer
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Repository checkout
uses: actions/checkout@v2
- name: PHPUnit
run: composer run-script test
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Mailchimp integration for Pimcore

[![Packagist](https://img.shields.io/packagist/v/wgg/pimcore-mailchimp)](https://packagist.org/packages/wgg/pimcore-mailchimp)
[![Software License](https://img.shields.io/packagist/l/wgg/pimcore-mailchimp)](LICENSE)

#### Requirements

* Pimcore >= 6.8.0
Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-symfony": "^0.12",
"friendsofphp/php-cs-fixer": "^2.18",
"symfony/phpunit-bridge": "^4.4|^5.2"
"symfony/phpunit-bridge": "^4.4|^5.2",
"phpstan/phpstan-phpunit": "^0.12.18"
},
"scripts": {
"test": [
"@composer install",
"@composer install --prefer-dist --ignore-platform-reqs",
"simple-phpunit"
],
"phpstan": [
"@composer install",
"@composer install --prefer-dist --ignore-platform-reqs",
"simple-phpunit install",
"@phpstan-general",
"@phpstan-tests"
],
Expand Down
7 changes: 5 additions & 2 deletions phpstan.tests.neon
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
parameters:
level: 8
paths:
- tests
bootstrapFiles:
- ./vendor/bin/.phpunit/phpunit/vendor/autoload.php
- ./vendor/pimcore/pimcore/stubs/dynamic-constants.php
- vendor/bin/.phpunit/phpunit/vendor/autoload.php
- vendor/pimcore/pimcore/stubs/dynamic-constants.php
checkMissingIterableValueType: false
excludePaths:
- tests/project/*
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
colors="true"
>
<testsuites>
<testsuite name="WgMailchimpBundle test suite">
<testsuite name="WggMailchimpBundle test suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
Expand Down

0 comments on commit d2b7458

Please sign in to comment.