-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from LycheeOrg/more-rules
- Loading branch information
Showing
6 changed files
with
1,068 additions
and
3,192 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
name: Test Impact | ||
|
||
# Run this workflow every time a new commit pushed to your repository | ||
on: | ||
push: | ||
paths-ignore: | ||
- '**/*.md' | ||
pull_request: | ||
paths-ignore: | ||
- '**/*.md' | ||
# Allow manually triggering the workflow. | ||
workflow_dispatch: | ||
|
||
jobs: | ||
kill_previous: | ||
name: 0️⃣ Kill previous runs | ||
runs-on: ubuntu-latest | ||
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch. | ||
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.11.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
execute_Lychee: | ||
name: 1️⃣ PHP - Lychee | ||
runs-on: ubuntu-latest | ||
needs: | ||
- kill_previous | ||
steps: | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT | ||
id: extract_branch | ||
|
||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0 | ||
coverage: none | ||
tools: phpstan | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'LycheeOrg/Lychee' | ||
|
||
- name: Fix composer.json | ||
run: composer require --dev "lychee-org/phpstan-lychee":"dev-${{ steps.extract_branch.outputs.branch }}" | ||
|
||
- name: Run PHPStan | ||
run: vendor/bin/phpstan analyze | ||
|
||
execute_php_exif: | ||
name: 1️⃣ PHP - php-exif | ||
runs-on: ubuntu-latest | ||
needs: | ||
- kill_previous | ||
steps: | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT | ||
id: extract_branch | ||
|
||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0 | ||
coverage: none | ||
tools: phpstan | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'LycheeOrg/php-exif' | ||
|
||
- name: Fix composer.json | ||
run: composer require --dev "lychee-org/phpstan-lychee":"dev-${{ steps.extract_branch.outputs.branch }}" | ||
|
||
- name: Run PHPStan | ||
run: vendor/bin/phpstan analyze | ||
|
||
execute_nested_sets: | ||
if: ${{ false }} # disable for now | ||
name: 1️⃣ PHP - Nested sets | ||
runs-on: ubuntu-latest | ||
needs: | ||
- kill_previous | ||
steps: | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT | ||
id: extract_branch | ||
|
||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0 | ||
coverage: none | ||
tools: phpstan | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'LycheeOrg/laravel-nestedset' | ||
ref: 'enable-phpstan' | ||
|
||
- name: Fix composer.json | ||
run: | | ||
composer require --dev "lychee-org/phpstan-lychee":"dev-${{ steps.extract_branch.outputs.branch }}" | ||
- name: Run PHPStan | ||
run: vendor/bin/phpstan analyze |
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
Oops, something went wrong.