Skip to content

Commit

Permalink
ci: static
Browse files Browse the repository at this point in the history
  • Loading branch information
brokeyourbike committed May 14, 2023
1 parent 0aaeb2e commit 0a7d4c5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-please.yml
Expand Up @@ -11,8 +11,8 @@ jobs:
timeout-minutes: 5

steps:
- uses: google-github-actions/release-please-action@v2
- uses: google-github-actions/release-please-action@v3
with:
release-type: php
- uses: actions/checkout@v2
- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}
40 changes: 10 additions & 30 deletions .github/workflows/static.yml
Expand Up @@ -8,59 +8,39 @@ on:

jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
php-version: [7.4,8.0]

steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
extensions: mbstring
tools: composer

- name: Download dependencies
run: composer update --no-interaction --no-progress

- name: Download PHPStan
run: composer bin phpstan require phpstan/phpstan

- name: Execute PHPStan
run: vendor/bin/phpstan analyze --no-progress
- run: composer update --no-interaction --no-progress
- run: composer bin phpstan require phpstan/phpstan
- run: vendor/bin/phpstan analyze --no-progress

psalm:
name: Psalm
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
php-version: [7.4,8.0]

steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
extensions: mbstring
tools: composer

- name: Download dependencies
run: composer update --no-interaction --no-progress

- name: Download Psalm
run: composer bin psalm require vimeo/psalm

- name: Execute Psalm
run: vendor/bin/psalm --no-progress --shepherd --output-format=github
- run: composer update --no-interaction --no-progress
- run: composer bin psalm require vimeo/psalm
- run: vendor/bin/psalm --no-progress --shepherd --output-format=github
23 changes: 9 additions & 14 deletions .github/workflows/tests.yml
Expand Up @@ -15,28 +15,23 @@ jobs:
php-version: [7.4,8.0]

steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install PHP
uses: shivammathur/setup-php@v2
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
coverage: pcov

- name: Install PHP dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- run: vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Run PHPUnit
run: vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload coverage to codecov
uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v3
continue-on-error: true
with:
files: ./coverage.xml

- name: Upload coverage to codeclimate
uses: paambaati/codeclimate-action@v3.0.0
- uses: paambaati/codeclimate-action@v4
continue-on-error: true
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }}
with:
Expand Down
7 changes: 6 additions & 1 deletion composer.json
Expand Up @@ -30,5 +30,10 @@
"bamarni/composer-bin-plugin": "^1.4",
"phpunit/phpunit": "^9.5"
},
"version": "1.0.2"
"version": "1.0.2",
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
}
}

0 comments on commit 0a7d4c5

Please sign in to comment.