From d839784ded32771f09f9ad75c92ed7f13462c8a9 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 17 Jan 2020 10:26:08 +0100 Subject: [PATCH] Add php action workflow --- .github/workflows/php.yml | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/php.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 00000000..f0ed781b --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,47 @@ +name: PHP Tests + +on: + push: + branches: + - master + - release/* + pull_request: + branches: + - master + +jobs: + lint: + name: Static analysis for php ${{ matrix.php }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] + os: ['ubuntu-latest'] + include: + - php: '5.6' + allow_failure: true + - php: '7.0' + allow_failure: true + + steps: + - name: Checkout code base + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v1 + with: + php-version: ${{ matrix.php }} + tools: composer, phpcs + + - name: PHP Lint + if: success() || matrix.allow_failure +# continue-on-error: ${{ matrix.allow_failure }} + run: | + composer require -n --no-progress overtrue/phplint + ./vendor/bin/phplint -n --exclude=vendor --no-ansi -- ./ + + - name: PHP CodeSniffer + if: success() || matrix.allow_failure + run: phpcs ./ --ignore=vendor/* --standard=PSR12