Skip to content

Create a sniff to ensure constants being typed by native types #1208

Create a sniff to ensure constants being typed by native types

Create a sniff to ensure constants being typed by native types #1208

Workflow file for this run

# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: "Build"
on:
pull_request:
push:
branches:
- "master"
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint:
name: "Lint"
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
dependencies:
- "highest"
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
operating-system:
- "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: error_reporting=-1, display_errors=On, zend.assertions=1
- name: "Reset composer platform"
if: matrix.php-version == '7.2' || matrix.php-version == '7.3' || matrix.php-version == '7.4'
run: "composer config --unset platform"
- name: "Install dependencies"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
- name: "Lint"
run: "bin/phing lint"
coding-standards:
name: "Coding standards"
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
dependencies:
- "highest"
php-version:
- "8.3"
operating-system:
- "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: error_reporting=-1, display_errors=On, zend.assertions=1
- name: "Install dependencies"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
- name: "Lint"
run: "bin/phing lint"
- name: "Coding Standard"
run: "bin/phing cs"
static-analysis:
name: "Static analysis"
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
dependencies:
- "highest"
php-version:
- "8.3"
operating-system:
- "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
- name: "Install dependencies"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
- name: "PHPStan"
run: "bin/phing phpstan"
tests:
name: "Tests"
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
dependencies:
- "lowest"
- "highest"
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
operating-system:
- "ubuntu-latest"
- "windows-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: mbstring
ini-values: error_reporting=-1, display_errors=On, zend.assertions=1
- name: "Reset composer platform"
if: matrix.php-version == '7.2' || matrix.php-version == '7.3' || matrix.php-version == '7.4' || matrix.php-version == '8.0'
run: "composer config --unset platform"
- name: "Install dependencies"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
- name: "Tests"
run: "bin/phing tests-without-code-coverage"
upload-code-coverage:
name: "Upload code coverage"
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
dependencies:
- "highest"
php-version:
- "8.3"
operating-system:
- "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: error_reporting=-1, display_errors=On, zend.assertions=1
- name: "Install dependencies"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
- name: "Tests"
run: bin/phing tests
- name: "Upload to Codecov.io"
uses: codecov/codecov-action@v4
with:
token: "${{ secrets.CODECOV }}"
files: temp/coverage.xml
flags: unittests
fail_ci_if_error: true
typos-check:
name: "Typos"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Search for misspellings"
uses: "crate-ci/typos@v1.19.0"