Skip to content

Test

Test #759

Workflow file for this run

# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: "Test"
on:
pull_request:
push:
schedule:
- cron: "0 8 * * *"
jobs:
phpcs:
name: "PHPCS"
runs-on: "ubuntu-22.04"
steps:
- uses: "actions/checkout@v4"
- uses: "shivammathur/setup-php@v2"
with:
coverage: none
php-version: 8.3
extensions: curl
tools: composer:v2, cs2pr
- run: "composer update --no-interaction --no-progress --no-suggest"
- run: "vendor/bin/phpcs -q --report=checkstyle | cs2pr"
validate-against-schema:
name: "Validate against schema"
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: curl
coverage: none
tools: composer:v2
- run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Build Docker image"
uses: "./.docker/validate-against-schema"
- name: "Lint XML configuration files"
uses: "./.docker/validate-against-schema"
with:
args: "xmllint --noout --schema vendor/squizlabs/php_codesniffer/phpcs.xsd src/Unleashed/ruleset.xml"
phpunit:
name: "PHPUnit"
runs-on: "ubuntu-22.04"
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
steps:
- uses: "actions/checkout@v4"
- uses: "shivammathur/setup-php@v2"
with:
coverage: none
php-version: "${{ matrix.php-version }}"
extensions: curl
- run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- run: composer update --no-interaction --no-progress
- run: ./vendor/bin/simple-phpunit
test-report:
name: "Test report"
runs-on: "ubuntu-22.04"
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
steps:
- uses: "actions/checkout@v4"
- uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: curl
coverage: none
- run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Test reports"
run: "make test-report"
test-fixes:
name: "Test fixes"
runs-on: "ubuntu-22.04"
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
steps:
- uses: "actions/checkout@v4"
- uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: curl
coverage: none
- run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Test fixes"
run: "make test-fix"