Skip to content

Added static check and GitHub workflow for it #8

Added static check and GitHub workflow for it

Added static check and GitHub workflow for it #8

---
name: test-php-static-check
on:
pull_request:
paths-ignore:
- "**/*.asciidoc"
- "**/*.md"
- "**/*.png"
push:
branches:
- main
paths-ignore:
- "**/*.asciidoc"
- "**/*.md"
- "**/*.png"
permissions:
contents: read
## Concurrency only allowed in the main branch.
## So old builds running for old commits within the same Pull Request are cancelled
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
generate-php-versions:
uses: ./.github/workflows/generate-php-versions.yml
static-check:
name: Check PHP code format and static analysis
runs-on: ubuntu-latest
needs: generate-php-versions
timeout-minutes: 30
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate-php-versions.outputs.php-versions) }}
env:
PHP_VERSION: ${{ matrix.php-version }}
steps:
- uses: actions/checkout@v4
- name: Check code format and static analysis
run: ./tools/build/test_php_static_check.sh --php_versions "${PHP_VERSION}"