Skip to content

Commit

Permalink
Update github actions workflow config
Browse files Browse the repository at this point in the history
  • Loading branch information
richan-fongdasen committed Feb 26, 2023
1 parent 3d3ba64 commit 0df21f8
Showing 1 changed file with 19 additions and 22 deletions.
41 changes: 19 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.0]
php: [8.2]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Cache composer dependencies
uses: actions/cache@v2
env:
Expand All @@ -33,21 +33,18 @@ jobs:
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
coverage: none
- name: Install composer dependencies
run: composer install --prefer-dist
- name: Run phpstan analysis
run: composer phpstan-analysis
- name: Run phpmd analysis
run: composer phpmd-analysis
- name: Run phpcpd analysis
run: vendor/bin/phpcpd --min-lines=3 --min-tokens=36 src/
phpunit:
run: composer install --no-interaction --prefer-dist
- name: Run statuc analysis
run: composer analyse
test:
name: Test (PHP ${{ matrix.php }})
needs: [analysis]
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.4, 8.1]
php: [7.4, 8.0, 8.1]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -59,7 +56,7 @@ jobs:
- name: Cache composer dependencies
uses: actions/cache@v2
env:
cache-name: laravel-varnishable-phpunit
cache-name: laravel-varnishable-test
with:
path: ~/.composer
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
Expand All @@ -68,21 +65,22 @@ jobs:
php-${{ matrix.php }}-build-
php-${{ matrix.php }}-
- name: Install composer dependencies
run: composer install --prefer-dist
run: composer install --no-interaction --prefer-dist
- name: Run the test suite
run: phpdbg -qrr -dmemory_limit=3G vendor/bin/phpunit
phpunit-cov:
run: vendor/bin/phpunit
test-coverage:
name: Test (PHP ${{ matrix.php }})
needs: [ analysis ]
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 8.0 ]
php: [ 8.2 ]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Cache composer dependencies
uses: actions/cache@v2
env:
cache-name: laravel-varnishable-phpunit-cov
cache-name: laravel-varnishable-test
with:
path: ~/.composer
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
Expand All @@ -95,11 +93,10 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
coverage: none
- name: Install composer dependencies
run: composer install --prefer-dist
run: composer install --no-interaction --prefer-dist
- name: Run the Coverage test suite
run: phpdbg -qrr -dmemory_limit=3G vendor/bin/phpunit --coverage-clover=clover.xml
run: vendor/bin/phpunit --coverage-clover=clover.xml
- name: Upload test coverage report to codecov.io
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down

0 comments on commit 0df21f8

Please sign in to comment.