Add 2025 day 5 #113
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: Tests | |
| on: [ push, pull_request ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Determine Composer cache directory | |
| shell: bash | |
| run: "echo \"COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV" | |
| - name: Cache dependencies installed with Composer | |
| uses: actions/cache@v2 | |
| with: | |
| path: "${{ env.COMPOSER_CACHE_DIR }}" | |
| key: os-${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
| restore-keys: os-${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
| - uses: php-actions/composer@v4 | |
| with: | |
| php_version: 8.0 | |
| - name: PHPUnit tests | |
| uses: php-actions/phpunit@v1 | |
| with: | |
| php_version: 8.0 | |
| args: --coverage-text | |
| analysis: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Determine Composer cache directory | |
| shell: bash | |
| run: "echo \"COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV" | |
| - name: Cache dependencies installed with Composer | |
| uses: actions/cache@v2 | |
| with: | |
| path: "${{ env.COMPOSER_CACHE_DIR }}" | |
| key: os-${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
| restore-keys: os-${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
| - uses: php-actions/composer@v4 | |
| with: | |
| php_version: 8.0 | |
| - name: PHPStan Static Analysis | |
| uses: php-actions/phpstan@v1 | |
| - name: Psalm Static Analysis | |
| uses: docker://vimeo/psalm-github-actions |