From e6d768d36cf8fdfbb1cc6200a8578b58b3ed83c3 Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Sun, 14 Mar 2021 10:44:45 +0100 Subject: [PATCH] Move CS to Github Actions --- .github/workflows/coding-standards.yml | 37 ++++++++++++++++++++++++++ .travis.yml | 1 - 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/coding-standards.yml diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml new file mode 100644 index 0000000..01a743d --- /dev/null +++ b/.github/workflows/coding-standards.yml @@ -0,0 +1,37 @@ +name: "Coding Standards" + +on: + pull_request: + push: + branches: + - "master" + +jobs: + coding-standards: + name: "Coding Standards" + runs-on: "ubuntu-20.04" + + strategy: + matrix: + php-version: + - "7.3" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + coverage: "none" + php-version: "${{ matrix.php-version }}" + tools: "cs2pr" + + - name: "Install dependencies with Composer" + uses: "ramsey/composer-install@v1" + + - name: "Install php-cs-fixer" + run: composer require "friendsofphp/php-cs-fixer:^2.16" + + - name: "Run php-cs-fixer" + run: "vendor/bin/php-cs-fixer fix --diff --dry-run -v" diff --git a/.travis.yml b/.travis.yml index 868561b..d22b7e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,4 +30,3 @@ install: composer update --prefer-source --no-interaction script: - composer check-platform-reqs - vendor/bin/phpunit --debug - - if [ "$TRAVIS_PHP_VERSION" != "8.0" ]; then composer require "friendsofphp/php-cs-fixer:^2.16" && vendor/bin/php-cs-fixer fix --diff --dry-run -v; fi