Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Jul 4, 2022
1 parent cfcdc7a commit 5e8403c
Showing 1 changed file with 10 additions and 31 deletions.
41 changes: 10 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
name: CI
on: ['push', 'pull_request']
jobs:
phpstan:
name: PHP Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: PHPStan
uses: docker://oskarstark/phpstan-ga
with:
args: analyse src/ -c phpstan.neon
tests:
name: Unit Tests for PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
ci:
name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
php: ['7.4', '8.0', '8.1']
php: ['8.1']
dependency-version: [prefer-stable]

steps:
Expand All @@ -27,7 +18,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: fileinfo, spl, json, dom, mbstring, pcntl
extensions: json, mbstring, pcntl
ini-values: disable_functions, error_reporting=E_ALL
tools: composer:v2
coverage: xdebug
Expand All @@ -37,28 +28,17 @@ jobs:
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install PHP 7 dependencies
- name: Install PHP 8.1 dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress
if: "matrix.php < 8"

- name: Install PHP 8 dependencies
if: "matrix.php >= 8"
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress

- name: Run Tests for PHP 7.4
if: "matrix.php == 7.4"
run: ./vendor/bin/pest --coverage

- name: Run Tests for PHP 8.0
if: "matrix.php == 8.0"
run: ./vendor/bin/pest --coverage


- name: PHP Static Analysis for PHP 8.1
run: ./vendor/bin/phpstan

- name: Run Tests for PHP 8.1
if: "matrix.php == 8.1"
run: ./vendor/bin/pest --coverage

support:
needs: [phpstan, tests]
needs: [ci]
name: Discord Notification
runs-on: ubuntu-latest
steps:
Expand All @@ -68,4 +48,3 @@ jobs:
with:
webhook: ${{ secrets.WEBHOOK_TOKEN }}
message: "**❤️ SUPPORT ONGOING DEVELOPMENT**\n➡️ https://github.com/Awilum#support-me"

0 comments on commit 5e8403c

Please sign in to comment.