Merge pull request #27 from slashrsm/release/2.0.0 #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Checks | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-versions: [ '8.2', '8.3', '8.4', '8.5' ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Validate Composer metadata | |
| run: | | |
| if [ -f composer.lock ]; then | |
| composer validate --strict --no-interaction | |
| else | |
| composer validate --strict --no-check-lock --no-interaction | |
| fi | |
| - name: Cache Composer packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-composer-${{ matrix.php-versions }}-${{ hashFiles('**/composer.json', '**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer-${{ matrix.php-versions }}- | |
| - name: Install dependencies | |
| run: | | |
| if [ -f composer.lock ]; then | |
| composer install --prefer-dist --no-progress --no-interaction | |
| else | |
| composer update --prefer-dist --no-progress --no-interaction | |
| fi | |
| - name: Run phpspec | |
| run: vendor/bin/phpspec run --config phpspec.yml.dist |