From a46447264d2aafedd2729143a70af5c76cb063c1 Mon Sep 17 00:00:00 2001 From: Fran Moreno Date: Tue, 19 Oct 2021 07:56:33 +0200 Subject: [PATCH] Move travis to Github Actions --- .github/workflows/build.yml | 71 +++++++++++++++++++++++++++++++++++++ .travis.yml | 12 ------- 2 files changed, 71 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2c9007f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,71 @@ +name: Build + +on: + pull_request: + branches: + push: + branches: + +jobs: + coding-standards: + name: "Coding Standards" + runs-on: "ubuntu-20.04" + + strategy: + matrix: + php-version: + - "7.4" + + 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: "Run PHP_CodeSniffer" + run: "vendor/bin/phpcs -n -s --report=checkstyle | cs2pr" + + tests: + name: "Tests" + runs-on: "ubuntu-20.04" + + strategy: + matrix: + php-version: + - "7.3" + - "7.4" + - "8.0" + - "8.1" + dependencies: + - "highest" + include: + - dependencies: "lowest" + 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" + with: + dependency-versions: "${{ matrix.dependencies }}" + + - name: "Run PHPUnit" + run: "vendor/bin/phpunit" + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cf25c44..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: php - -php: - - 7.3 - - 7.4 - -install: - - travis_retry composer install --no-interaction - -script: - - vendor/bin/phpunit - - vendor/bin/phpcs -n -s