Skip to content

Commit

Permalink
Merge pull request #140 from Dealerdirect/feature/ci-various-updates
Browse files Browse the repository at this point in the history
CI: various updates
  • Loading branch information
Potherca authored Jan 25, 2022
2 parents ee2ee17 + 1a4405e commit 7451ccc
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 19 deletions.
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
{

const KEY_MAX_DEPTH = 'phpcodesniffer-search-depth';

const MESSAGE_ERROR_WRONG_MAX_DEPTH =
Expand Down

0 comments on commit 7451ccc

Please sign in to comment.