-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
7 changed files
with
250 additions
and
301 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,93 +1,45 @@ | ||
name: Continuous integration checks | ||
name: Continuous Integration | ||
|
||
on: | ||
# Run on PRs and pushes, only on significant changes. | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
- "develop" | ||
- "main" | ||
paths-ignore: | ||
- '**.md' | ||
- "**.md" | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
- "**.md" | ||
|
||
# Prevent multiple unnecessary CI runs on the same branch. | ||
# Link: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
phpcs: | ||
name: PHPCS check on PHP ${{ matrix.php }} | ||
phpstan: | ||
name: PHP static code analysis using PHP - ${{ matrix.php }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '7.4' ] | ||
|
||
php: [ '8.2', '8.3' ] | ||
steps: | ||
# Checkout repository | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Setup PHP versions, run checks | ||
- name: PHP setup | ||
uses: shivammathur/setup-php@v2 | ||
- name: PHP Static code analysis | ||
uses: infinum/eightshift-deploy-actions-public/.github/actions/lint-php-static@main | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
tools: cs2pr | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Install dependencies and handle caching in one go. | ||
# @link https://github.com/marketplace/actions/install-composer-dependencies | ||
- name: Install Composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: highest | ||
ignore-cache: "yes" | ||
|
||
- name: Check coding standards using PHPCS | ||
continue-on-error: true | ||
run: composer test:standards -- --runtime-set testVersion ${{ matrix.php }}- --report-full --report-checkstyle=./phpcs-report.xml | ||
|
||
- name: Show PHPCS results in PR | ||
run: cs2pr ./phpcs-report.xml | ||
PHP_VERSION: ${{ matrix.php }} | ||
PROJECT_PATH: '' | ||
|
||
phpstan: | ||
name: PHPStan check | ||
phpcs: | ||
name: PHP check coding standards using PHP - ${{ matrix.php }} | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.allowed_failure }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '7.4' ] | ||
allowed_failure: [ true ] | ||
|
||
php: [ '8.2', '8.3' ] | ||
steps: | ||
# Checkout repository | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Setup PHP versions, run checks | ||
- name: PHP setup | ||
uses: shivammathur/setup-php@v2 | ||
- name: PHP check coding standards | ||
uses: infinum/eightshift-deploy-actions-public/.github/actions/lint-php@main | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Install dependencies and handle caching in one go. | ||
# @link https://github.com/marketplace/actions/install-composer-dependencies | ||
- name: Install Composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: highest | ||
ignore-cache: "yes" | ||
|
||
- name: Check code consistency using PHPStan | ||
run: composer test:types | ||
PHP_VERSION: ${{ matrix.php }} | ||
PROJECT_PATH: '' |
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.