Merge pull request #25 from CodeLieutenant/chore/traits #25
This file contains 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: "Run Tests" | |
on: | |
push: | |
branches: | |
- master | |
path: | |
- 'src/**' | |
- 'tests/**' | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'src/**' | |
- 'tests/**' | |
env: | |
XDEBUG_MODE: "coverage" | |
GITHUB_WORKSPACE: /var/www/html | |
jobs: | |
testing: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
operating-system: ['ubuntu-latest'] | |
php-versions: ['8.1', '8.2', '8.3'] | |
phpts: [true, false] | |
env: | |
extensions: mbstring, intl, sodium, xsl, zip, pdo, pdo_sqlite, xdebug, curl, igbinary, msgpack | |
key: extensions-cache | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cache Vendor | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }} | |
- name: Setup cache environment | |
id: extcache | |
uses: shivammathur/cache-extensions@v1 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: ${{ env.extensions }} | |
key: ${{ env.key }} | |
- name: Cache extensions | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.extcache.outputs.dir }} | |
key: ${{ steps.extcache.outputs.key }}-${{ env.phpts }} | |
restore-keys: ${{ steps.extcache.outputs.key }}-${{ env.phpts }} | |
- name: Setup PHP | |
id: setup-php | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
phpts: ${{ matrix.phpts }} | |
extensions: ${{ env.extensions }} | |
tools: php-cs-fixer, phpcs, composer | |
update: true | |
coverage: xdebug | |
- name: Composer install | |
run: composer install -q --no-ansi --prefer-dist --no-interaction --no-progress | |
- name: Run Tests | |
run: vendor/bin/pest --coverage-clover=coverage.xml --coverage --colors=always --fail-on-risky --fail-on-warning --fail-on-deprecation --strict-coverage | |
- uses: codecov/codecov-action@v4.0.1 | |
with: | |
file: ./coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: dmalusev/laravel-crypto | |
name: laravel-crypto | |
fail_ci_if_error: false |