-
Notifications
You must be signed in to change notification settings - Fork 10
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
5696fe7
commit 1a7f290
Showing
13 changed files
with
134 additions
and
118 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 |
---|---|---|
@@ -1,53 +1,61 @@ | ||
name: 'CI' | ||
name: 'Static Analysis' | ||
|
||
on: | ||
pull_request: ~ | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: ~ | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
tests: | ||
runs-on: 'ubuntu-latest' | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- '7.4' | ||
|
||
steps: | ||
- name: 'Checkout' | ||
uses: 'actions/checkout@v3' | ||
|
||
- name: 'Install PHP' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: '${{ matrix.php-version }}' | ||
coverage: 'none' | ||
tools: 'composer:v2' | ||
|
||
- name: 'Get composer cache directory' | ||
id: 'composercache' | ||
run: 'echo "::set-output name=dir::$(composer config cache-files-dir)"' | ||
|
||
- name: 'Cache dependencies' | ||
uses: 'actions/cache@v3' | ||
with: | ||
path: '${{ steps.composercache.outputs.dir }}' | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: '${{ runner.os }}-composer-' | ||
|
||
- name: 'Prepare credentials' | ||
env: | ||
MAGENTO_USERNAME: '${{ secrets.MAGENTO_USERNAME }}' | ||
MAGENTO_PASSWORD: '${{ secrets.MAGENTO_PASSWORD }}' | ||
run: 'composer config -g http-basic.repo.magento.com "$MAGENTO_USERNAME" "$MAGENTO_PASSWORD"' | ||
|
||
- name: 'Install dependencies' | ||
run: 'composer install --prefer-dist' | ||
|
||
- name: 'Run PHP CodeSniffer' | ||
run: 'vendor/bin/phpcs --extensions=php,phtml' | ||
|
||
- name: 'Run PHPMD' | ||
run: 'vendor/bin/phpmd . xml phpmd.xml.dist' | ||
tests: | ||
runs-on: 'ubuntu-latest' | ||
|
||
steps: | ||
- name: 'Checkout' | ||
uses: 'actions/checkout@v3' | ||
|
||
- name: 'Install PHP' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: '7.4' | ||
coverage: 'none' | ||
tools: 'composer:v2' | ||
env: | ||
COMPOSER_AUTH_JSON: | | ||
{ | ||
"http-basic": { | ||
"repo.magento.com": { | ||
"username": "${{ secrets.MAGENTO_USERNAME }}", | ||
"password": "${{ secrets.MAGENTO_PASSWORD }}" | ||
} | ||
} | ||
} | ||
- name: 'Get composer cache directory' | ||
id: 'composer-cache' | ||
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT' | ||
|
||
- name: 'Cache dependencies' | ||
uses: 'actions/cache@v3' | ||
with: | ||
path: '${{ steps.composer-cache.outputs.dir }}' | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: '${{ runner.os }}-composer-' | ||
|
||
- name: 'Install dependencies' | ||
run: 'composer install --prefer-dist' | ||
|
||
- name: 'Run composer audit' | ||
run: 'composer audit --format=plain' | ||
|
||
- name: 'Run Parallel Lint' | ||
run: 'vendor/bin/parallel-lint --exclude vendor .' | ||
|
||
- name: 'Run PHP CodeSniffer' | ||
run: 'vendor/bin/phpcs --extensions=php,phtml' | ||
|
||
- name: 'Run PHPMD' | ||
run: 'vendor/bin/phpmd . xml phpmd.xml.dist' | ||
|
||
- name: 'Run PHPStan' | ||
run: 'vendor/bin/phpstan analyse' |
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
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
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
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
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
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
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
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
Oops, something went wrong.