-
Notifications
You must be signed in to change notification settings - Fork 0
chore/rename-namespace-queryfilters #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
c48f41d
🔧 chore: rename namespace from `AnalyzerTool` to `QueryFilters`
oscabreraCP 86e59e8
🔧 chore: update Laravel dependency constraints and locked versions in…
oscabreraCP a29c8c6
✨ feat: add custom composite GitHub Actions for improved CI workflows
oscabreraCP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,54 @@ | ||
name: check-analysis | ||
description: Verify static analysis results and provide a summary report | ||
|
||
inputs: | ||
phpstan_exit_code: | ||
description: "Exit code from PHPStan analysis" | ||
required: true | ||
pint_exit_code: | ||
description: "Exit code from Laravel Pint analysis" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check analysis results | ||
shell: bash | ||
run: | | ||
echo "### Static Analysis Results 🔍" >> $GITHUB_STEP_SUMMARY | ||
|
||
# Handle empty values with defaults | ||
PHPSTAN_CODE="${{ inputs.phpstan_exit_code }}" | ||
PINT_CODE="${{ inputs.pint_exit_code }}" | ||
|
||
# Set default values if empty | ||
[ -z "$PHPSTAN_CODE" ] && PHPSTAN_CODE="1" && echo "Warning: PHPStan exit code was empty, using default 1" | ||
[ -z "$PINT_CODE" ] && PINT_CODE="1" && echo "Warning: Laravel Pint exit code was empty, using default 1" | ||
|
||
echo "Using PHPStan exit code: $PHPSTAN_CODE" | ||
echo "Using Laravel Pint exit code: $PINT_CODE" | ||
|
||
FAIL=0 | ||
|
||
if [ "$PHPSTAN_CODE" = "0" ]; then | ||
echo "✅ PHPStan: PASSED" >> $GITHUB_STEP_SUMMARY | ||
else | ||
echo "❌ PHPStan: FAILED (exit code: $PHPSTAN_CODE)" >> $GITHUB_STEP_SUMMARY | ||
FAIL=1 | ||
fi | ||
|
||
if [ "$PINT_CODE" = "0" ]; then | ||
echo "✅ Laravel Pint: PASSED" >> $GITHUB_STEP_SUMMARY | ||
else | ||
echo "❌ Laravel Pint: FAILED (exit code: $PINT_CODE)" >> $GITHUB_STEP_SUMMARY | ||
FAIL=1 | ||
fi | ||
|
||
if [ "$FAIL" = "1" ]; then | ||
echo "" >> $GITHUB_STEP_SUMMARY | ||
echo "⚠️ One or more analyses have failed. Please review the errors above." >> $GITHUB_STEP_SUMMARY | ||
exit 1 | ||
else | ||
echo "" >> $GITHUB_STEP_SUMMARY | ||
echo "🎉 All static analysis checks passed successfully!" >> $GITHUB_STEP_SUMMARY | ||
fi |
This file contains hidden or 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,40 @@ | ||
# .github/actions/composer-setup-dev/action.yml | ||
name: composer-setup-dev | ||
description: Setup PHP and install dependencies with Composer (development environment) | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
tools: composer | ||
|
||
- name: Cache vendor directory | ||
id: cache-vendor | ||
uses: actions/cache@v4 | ||
with: | ||
path: vendor | ||
key: vendor-dev-${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
|
||
- name: Cache Composer packages | ||
if: steps.cache-vendor.outputs.cache-hit != 'true' | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.composer/cache | ||
key: composer-cache-${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
composer-cache-${{ runner.os }}- | ||
|
||
- name: Install Composer dependencies | ||
if: steps.cache-vendor.outputs.cache-hit != 'true' | ||
run: composer install --ignore-platform-reqs | ||
shell: bash | ||
|
||
- name: Verify Composer dependencies integrity | ||
if: steps.cache-vendor.outputs.cache-hit == 'true' | ||
run: composer dump-autoload --no-interaction | ||
shell: bash | ||
|
This file contains hidden or 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,38 @@ | ||
# .github/actions/composer-setup/action.yml | ||
name: composer-setup | ||
description: Setup PHP and install dependencies with Composer | ||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
tools: composer | ||
|
||
- name: Cache vendor directory | ||
id: cache-vendor | ||
uses: actions/cache@v4 | ||
with: | ||
path: vendor | ||
key: vendor-prod-${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
|
||
- name: Cache Composer packages | ||
if: steps.cache-vendor.outputs.cache-hit != 'true' | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.composer/cache | ||
key: composer-cache-${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
composer-cache-${{ runner.os }}- | ||
|
||
- name: Install Composer dependencies | ||
if: steps.cache-vendor.outputs.cache-hit != 'true' | ||
run: composer install --ignore-platform-reqs --no-dev --optimize-autoloader | ||
shell: bash | ||
|
||
- name: Verify Composer dependencies integrity | ||
if: steps.cache-vendor.outputs.cache-hit == 'true' | ||
run: composer dump-autoload --optimize --no-dev --no-interaction | ||
shell: bash |
This file contains hidden or 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,19 @@ | ||
# .github/actions/laravel-pint/action.yml | ||
name: laravel-pint | ||
description: Run Laravel Pint static analysis. | ||
outputs: | ||
exit_code: | ||
description: "Exit code from Laravel Pint execution" | ||
value: ${{ steps.run_pint.outputs.exit_code }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Run Laravel Pint | ||
id: run_pint | ||
shell: bash | ||
run: |- | ||
php devops/laravel-pint/analyzer.php | ||
PINT_EXIT_CODE=$? | ||
echo "Laravel Pint completed with exit code: $PINT_EXIT_CODE" | ||
echo "exit_code=$PINT_EXIT_CODE" >> $GITHUB_OUTPUT |
This file contains hidden or 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,42 @@ | ||
# .github/actions/npm-build/action.yml | ||
name: npm-build | ||
description: Setup Node.js, install dependencies, and build project with optimized caching | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Cache node_modules | ||
id: cache-node-modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Cache npm | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.npm | ||
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | ||
restore-keys: | | ||
npm-${{ runner.os }}- | ||
|
||
- name: Install dependencies | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
run: npm ci | ||
shell: bash | ||
|
||
- name: Verify dependencies integrity | ||
if: steps.cache-node-modules.outputs.cache-hit == 'true' | ||
run: npm ls --depth=0 || true | ||
shell: bash | ||
|
||
- name: Build project | ||
run: npm run build | ||
shell: bash | ||
|
This file contains hidden or 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,19 @@ | ||
# .github/actions/phpstan/action.yml | ||
name: phpstan | ||
description: Run PHPStan static analysis. | ||
outputs: | ||
exit_code: | ||
description: "Exit code from PHPStan execution" | ||
value: ${{ steps.run_phpstan.outputs.exit_code }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Run PHPStan | ||
id: run_phpstan | ||
shell: bash | ||
run: |- | ||
php devops/phpstan/analyzer.php | ||
PHPSTAN_EXIT_CODE=$? | ||
Oscabrera marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo "PHPStan completed with exit code: $PHPSTAN_EXIT_CODE" | ||
echo "exit_code=$PHPSTAN_EXIT_CODE" >> $GITHUB_OUTPUT |
This file contains hidden or 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,16 @@ | ||
name: prepare-analysis-env | ||
description: Prepare environment for static analysis | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Prepare environment | ||
shell: bash | ||
run: |- | ||
chmod +x vendor/bin/* | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git fetch origin development | ||
echo "Current branch: $(git rev-parse --abbrev-ref HEAD)" | ||
echo "HEAD commit: $(git rev-parse HEAD)" | ||
echo "PR commits between development and HEAD:" | ||
git log --oneline origin/development..HEAD |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.