1*8817535bSAndreas Gohrname: PHP Composer 2*8817535bSAndreas Gohr 3*8817535bSAndreas Gohron: 4*8817535bSAndreas Gohr push: 5*8817535bSAndreas Gohr branches: [ "main" ] 6*8817535bSAndreas Gohr pull_request: 7*8817535bSAndreas Gohr branches: [ "main" ] 8*8817535bSAndreas Gohr 9*8817535bSAndreas Gohrpermissions: 10*8817535bSAndreas Gohr contents: read 11*8817535bSAndreas Gohr 12*8817535bSAndreas Gohrjobs: 13*8817535bSAndreas Gohr build: 14*8817535bSAndreas Gohr 15*8817535bSAndreas Gohr runs-on: ubuntu-latest 16*8817535bSAndreas Gohr 17*8817535bSAndreas Gohr steps: 18*8817535bSAndreas Gohr - uses: actions/checkout@v3 19*8817535bSAndreas Gohr 20*8817535bSAndreas Gohr - name: Validate composer.json and composer.lock 21*8817535bSAndreas Gohr run: composer validate --strict 22*8817535bSAndreas Gohr 23*8817535bSAndreas Gohr - name: Cache Composer packages 24*8817535bSAndreas Gohr id: composer-cache 25*8817535bSAndreas Gohr uses: actions/cache@v3 26*8817535bSAndreas Gohr with: 27*8817535bSAndreas Gohr path: vendor 28*8817535bSAndreas Gohr key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} 29*8817535bSAndreas Gohr restore-keys: | 30*8817535bSAndreas Gohr ${{ runner.os }}-php- 31*8817535bSAndreas Gohr 32*8817535bSAndreas Gohr - name: Install dependencies 33*8817535bSAndreas Gohr run: composer install --prefer-dist --no-progress 34*8817535bSAndreas Gohr 35*8817535bSAndreas Gohr # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" 36*8817535bSAndreas Gohr # Docs: https://getcomposer.org/doc/articles/scripts.md 37*8817535bSAndreas Gohr 38*8817535bSAndreas Gohr - name: Run test suite 39*8817535bSAndreas Gohr run: composer run-script tests 40