Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: various updates #140

Merged
merged 7 commits into from Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/integrationtest.yml
Expand Up @@ -10,6 +10,12 @@ on:
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -145,21 +151,21 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: error_reporting=E_ALL, display_errors=On
ini-values: error_reporting=-1, display_errors=On
coverage: none

- name: 'Composer: set PHPCS version for tests'
run: composer require --no-update --no-scripts squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}"
run: composer require --no-update --no-scripts squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-interaction

# Install PHPCompatibility 7.x/8.x for PHPCS < 2.3.
- name: 'Composer: set PHPCompatibility version for tests (PHPCS < 2.3)'
if: ${{ matrix.phpcompat != 'composer' }}
run: composer require --dev --no-update --no-scripts phpcompatibility/php-compatibility:"${{ matrix.phpcompat }}"
run: composer require --dev --no-update --no-scripts phpcompatibility/php-compatibility:"${{ matrix.phpcompat }}" --no-interaction

# 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@v1"
uses: "ramsey/composer-install@v2"
with:
composer-options: --no-scripts --optimize-autoloader

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/linting.yaml
Expand Up @@ -7,6 +7,12 @@ on:
- pull_request
- workflow_dispatch

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
validate-composer:
runs-on: ubuntu-18.04
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/phplint.yml
Expand Up @@ -8,6 +8,12 @@ on:
# Allow manually triggering the workflow.
- workflow_dispatch

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
phplint:
runs-on: ubuntu-latest
Expand All @@ -32,7 +38,7 @@ jobs:
# 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@v1"
uses: "ramsey/composer-install@v2"

- name: Lint against parse errors
run: composer lint -- --checkstyle | cs2pr
14 changes: 10 additions & 4 deletions .github/workflows/quicktest.yml
Expand Up @@ -9,6 +9,12 @@ on:
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
#### QUICK TEST STAGE ####
# This is a much quicker test which only runs the integration tests against a limited set of
Expand Down Expand Up @@ -45,21 +51,21 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: error_reporting=E_ALL, display_errors=On
ini-values: error_reporting=-1, display_errors=On
coverage: none

- name: 'Composer: set PHPCS version for tests'
run: composer require --no-update --no-scripts squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}"
run: composer require --no-update --no-scripts squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-interaction

# Install PHPCompatibility 7.x/8.x for PHPCS < 2.3.
- name: 'Composer: set PHPCompatibility version for tests (PHPCS < 2.3)'
if: ${{ matrix.phpcompat != 'composer' }}
run: composer require --dev --no-update --no-scripts phpcompatibility/php-compatibility:"${{ matrix.phpcompat }}"
run: composer require --dev --no-update --no-scripts phpcompatibility/php-compatibility:"${{ matrix.phpcompat }}" --no-interaction

# 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@v1"
uses: "ramsey/composer-install@v2"
with:
composer-options: --no-scripts --optimize-autoloader

Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/securitycheck.yml
Expand Up @@ -8,6 +8,12 @@ on:
# Allow manually triggering the workflow.
- workflow_dispatch

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
security-check:
runs-on: ubuntu-latest
Expand All @@ -30,13 +36,13 @@ jobs:
# 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@v1"
uses: "ramsey/composer-install@v2"

- name: Download security checker
run: wget -P . https://github.com/fabpot/local-php-security-checker/releases/download/v1.0.0/local-php-security-checker_1.0.0_linux_amd64
run: wget -P . https://github.com/fabpot/local-php-security-checker/releases/download/v1.2.0/local-php-security-checker_1.2.0_linux_amd64

- name: Make security checker executable
run: chmod +x ./local-php-security-checker_1.0.0_linux_amd64
run: chmod +x ./local-php-security-checker_1.2.0_linux_amd64

- name: Check against insecure dependencies
run: ./local-php-security-checker_1.0.0_linux_amd64 --path=composer.lock
run: ./local-php-security-checker_1.2.0_linux_amd64 --path=composer.lock
1 change: 0 additions & 1 deletion src/Plugin.php
Expand Up @@ -34,7 +34,6 @@
*/
class Plugin implements PluginInterface, EventSubscriberInterface
{

jrfnl marked this conversation as resolved.
Show resolved Hide resolved
const KEY_MAX_DEPTH = 'phpcodesniffer-search-depth';

const MESSAGE_ERROR_WRONG_MAX_DEPTH =
Expand Down