diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c7cf3f8..1f5e6bc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,12 +1,16 @@ name: CI -on: [ push, pull_request ] +on: + push: + branches: ['main'] + pull_request: jobs: ci: name: CI runs-on: ubuntu-20.04 strategy: + fail-fast: false matrix: php-versions: [ '7.4', '8.0', '8.1', '8.2' ] @@ -23,10 +27,12 @@ jobs: run: find -L . -path ./vendor -prune -o -type f -name '*.php' -print0 | xargs -0 -n 1 -P $(nproc) php -l - name: Get composer cache directory + # https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache composer + # https://github.com/shivammathur/setup-php/tree/v2/#cache-composer-dependencies uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }}