From 3c91d71fb08f068e5b7fc7ae9fc2ccfc7b1dded5 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula <42547589+terabytesoftw@users.noreply.github.com> Date: Tue, 16 Jun 2020 20:18:08 -0400 Subject: [PATCH] Adjust github actions (#258) * Remove mutation testing. * Add dependabot. --- .github/dependabot.yml | 7 +++++ .github/workflows/build.yml | 7 +++-- .github/workflows/mutation.yml | 51 ---------------------------------- .github/workflows/static.yml | 13 ++++++--- README.md | 32 +++++++++++++++++++-- composer.json | 4 +-- infection.json.dist | 16 ----------- 7 files changed, 52 insertions(+), 78 deletions(-) create mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/mutation.yml delete mode 100644 infection.json.dist diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..afb98ae0c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2dc627e1f..d4100c11c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,9 +7,11 @@ name: build jobs: tests: name: PHP ${{ matrix.php-version }}-${{ matrix.os }} + env: extensions: curl, mbstring, dom, intl, json, libxml, xml, xmlwriter key: cache-v1 + update: true runs-on: ${{ matrix.os }} @@ -29,14 +31,14 @@ jobs: - name: Setup cache environment id: cache-env - uses: shivammathur/cache-extensions@v1 + uses: shivammathur/cache-extensions@1.1.0 with: php-version: ${{ matrix.php-version }} extensions: ${{ env.extensions }} key: ${{ env.key }} - name: Cache extensions - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ${{ steps.cache-env.outputs.dir }} key: ${{ steps.cache-env.outputs.key }} @@ -49,6 +51,7 @@ jobs: extensions: ${{ env.extensions }} ini-values: date.timezone='UTC' coverage: pcov + tools: composer:v2 - name: Determine composer cache directory on Linux if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml deleted file mode 100644 index 84fd18fdf..000000000 --- a/.github/workflows/mutation.yml +++ /dev/null @@ -1,51 +0,0 @@ -on: - pull_request: - push: - branches: - - "master" - -name: mutation test - -jobs: - mutation: - name: PHP ${{ matrix.php-version }}-${{ matrix.os }} - - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: - - ubuntu-latest - - php-version: - - "7.4" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2" - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - coverage: "pcov" - php-version: "${{ matrix.php-version }}" - ini-values: memory_limit=-1 - - - name: Determine composer cache directory - run: echo "::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)" - - - name: Cache dependencies installed with composer - uses: actions/cache@v1 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php-version }}-composer- - - - name: Install dependencies with composer - run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader - - - name: Run test mutation infection with coverage - run: vendor/bin/infection - env: - STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index d3df1b645..b79d84c94 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -2,12 +2,16 @@ on: - pull_request - push -name: static analysis with phan +name: static analysis jobs: mutation: name: PHP ${{ matrix.php-version }}-${{ matrix.os }} + env: + extensions: ast + update: true + runs-on: ${{ matrix.os }} strategy: @@ -26,14 +30,15 @@ jobs: uses: "shivammathur/setup-php@v2" with: php-version: "${{ matrix.php-version }}" - tools: cs2pr, phan + extensions: ${{ env.extensions }} + tools: composer:v2, cs2pr coverage: none - name: Determine composer cache directory run: echo "::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)" - name: Cache dependencies installed with composer - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ${{ env.COMPOSER_CACHE_DIR }} key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} @@ -44,4 +49,4 @@ jobs: run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader - name: Static analysis with phan - run: phan --no-progress-bar --output-mode checkstyle | cs2pr --graceful-warnings --colorize + run: vendor/bin/phan --no-progress-bar --output-mode checkstyle | cs2pr --graceful-warnings --colorize diff --git a/README.md b/README.md index 86c072861..8f8fa767b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@