From 28aae6aca60f71c58b49d9076f5b85ad6b068d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Hochd=C3=B6rfer?= Date: Sat, 23 Jan 2021 19:58:11 +0100 Subject: [PATCH] Add GitHub Action configuration --- .coveralls.yml | 3 ++ .github/workflows/ci.yml | 61 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 21 -------------- auth.json.enc | 2 -- 4 files changed, 64 insertions(+), 23 deletions(-) create mode 100644 .coveralls.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml delete mode 100644 auth.json.enc diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..0925971 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,3 @@ +coverage_clover: clover.xml +json_path: coveralls-upload.json + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2c5b8c7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,61 @@ +name: ci +on: [push, pull_request] + +jobs: + run: + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: ['ubuntu-latest'] + php-versions: ['7.4'] + coveralls: [false] + include: + - operating-system: 'ubuntu-latest' + php-versions: '7.4' + coveralls: true + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Configure PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: composer:v1 + coverage: xdebug + + - name: Install Composer dependencies + run: composer install + + - name: Linting code + run: ./vendor/bin/phing lint + + - name: Codesniffer + run: ./vendor/bin/phing sniff + + - name: Static code analysis + run: ./vendor/bin/phing analyse + + - name: Magerun + if: matrix.coveralls == false + run: | + wget https://files.magerun.net/n98-magerun2-latest.phar + mkdir -p ~/.n98-magerun2/modules + ln -s $(pwd) ~/.n98-magerun2/modules/magerun2-password-normalizer + php n98-magerun2-latest.phar help dev:customer:normalize-passwords + + - name: Unittests + if: matrix.coveralls == false + run: ./vendor/bin/phing unit + + - name: Unittests with coverage + if: matrix.coveralls == true + run: ./vendor/bin/phing unit-with-coverage + + - name: Coveralls report + if: matrix.coveralls == true + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer require php-coveralls/php-coveralls + ./vendor/bin/php-coveralls --coverage_clover=clover.xml -v diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1418155..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: php - -cache: - directories: - - $HOME/.composer/cache - -matrix: - include: - - php: 7.0 - - php: 7.1 - -before_install: - - if [[ $encrypted_dcf04ab9e4c0_key != '' ]]; then openssl aes-256-cbc -K $encrypted_137bf9c56685_key -iv $encrypted_137bf9c56685_iv -in auth.json.enc -out auth.json -d ; fi - -before_script: - - composer self-update - - composer validate - -script: - - if [[ $encrypted_dcf04ab9e4c0_key != '' ]]; then composer install --prefer-source ; fi - - if [[ $encrypted_dcf04ab9e4c0_key != '' ]]; then composer test ; fi diff --git a/auth.json.enc b/auth.json.enc deleted file mode 100644 index 52f1a42..0000000 --- a/auth.json.enc +++ /dev/null @@ -1,2 +0,0 @@ -wZ,tǢIe9{ե?.)OZnk5R1b)c1niT9׵Vx[b<0?XG: Լ -