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’ll 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 all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/integrationtest.yml
Original file line number Diff line number Diff line change
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
16 changes: 11 additions & 5 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ 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
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Validate composer.json and composer.lock
uses: "docker://composer"
with:
Expand All @@ -20,7 +26,7 @@ jobs:
lint-json:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Lint json
uses: "docker://pipelinecomponents/jsonlint:latest"
with:
Expand All @@ -29,20 +35,20 @@ jobs:
yamllint:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Check yaml for issues
uses: pipeline-components/yamllint@master

php-codesniffer:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Check php for code style and php cross-version compatibility issues
uses: pipeline-components/php-codesniffer@master

lint-remark:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Check markdown
uses: pipeline-components/remark-lint@master
8 changes: 7 additions & 1 deletion .github/workflows/phplint.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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