-
Notifications
You must be signed in to change notification settings - Fork 2k
chore: Add Structarmed to QA #10180
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
Open
samsonasik
wants to merge
10
commits into
codeigniter4:develop
Choose a base branch
from
samsonasik:chore-add-structarmed
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+122
−0
Open
chore: Add Structarmed to QA #10180
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
13cdf53
chore: Add Structarmed to QA
samsonasik 6b986f2
chore: use latest structarmed 0.3.1
samsonasik d472edb
chore: bump structarmed to 0.3.2
samsonasik edfab52
bump structarmed to 0.3.3 to properly fix cache on CI
samsonasik adad6ee
chore: bump to structarmed 0.3.4 to fix very long list progressbar
samsonasik 3ad361f
chore: bump to structarmed 0.3.5
samsonasik 1e18dad
chore: bump structarmed to 0.4.0
samsonasik 3d1ac1c
chore: remove ignore platform php 8.5 on test-structarmed workflow
samsonasik 2d89b87
chore: use php 8.5 in php-versions
samsonasik fce857c
use tools: composer under Setup PHP
samsonasik 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,96 @@ | ||
| # When a PR is opened or a push is made, perform | ||
| # a static analysis check on the code using Structarmed. | ||
| name: Structarmed | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - 'develop' | ||
| - '4.*' | ||
| paths: | ||
| - 'app/**.php' | ||
| - 'system/**.php' | ||
| - 'tests/**.php' | ||
| - 'utils/**.php' | ||
| - '.github/workflows/test-structarmed.yml' | ||
| - composer.json | ||
| - structarmed.php | ||
| - '**.neon.dist' | ||
|
|
||
| push: | ||
| branches: | ||
| - 'develop' | ||
| - '4.*' | ||
| paths: | ||
| - 'app/**.php' | ||
| - 'system/**.php' | ||
| - 'tests/**.php' | ||
| - 'utils/**.php' | ||
| - '.github/workflows/test-structarmed.yml' | ||
| - composer.json | ||
| - structarmed.php | ||
| - '**.neon.dist' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| name: PHP ${{ matrix.php-version }} Analyze code (Structarmed) | ||
| runs-on: ubuntu-24.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| php-version: | ||
| - '8.2' | ||
| - '8.5' | ||
|
|
||
| steps: | ||
| - name: Checkout base branch for PR | ||
| if: github.event_name == 'pull_request' | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| ref: ${{ github.base_ref }} | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 | ||
| with: | ||
| php-version: ${{ matrix.php-version }} | ||
| extensions: intl | ||
| tools: composer | ||
|
|
||
| - name: Validate composer.json | ||
| run: composer validate --strict | ||
|
|
||
| - name: Get composer cache directory | ||
| id: composer-cache | ||
| run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Cache dependencies | ||
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | ||
| with: | ||
| path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_FILES_DIR }} | ||
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
| restore-keys: ${{ runner.os }}-composer- | ||
|
|
||
| - name: Install dependencies | ||
| run: composer update --ansi --no-interaction ${{ matrix.composer-option }} | ||
|
|
||
| - name: Structarmed Cache | ||
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | ||
| with: | ||
| path: /tmp/structarmed | ||
| key: ${{ runner.os }}-structarmed-${{ github.run_id }} | ||
| restore-keys: ${{ runner.os }}-structarmed- | ||
|
|
||
| - run: mkdir -p /tmp/structarmed | ||
|
|
||
| - name: Run static analysis | ||
| run: vendor/bin/structarmed analyze | ||
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
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,25 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * This file is part of CodeIgniter 4 framework. | ||
| * | ||
| * (c) CodeIgniter Foundation <admin@codeigniter.com> | ||
| * | ||
| * For the full copyright and license information, please view | ||
| * the LICENSE file that was distributed with this source code. | ||
| */ | ||
|
|
||
| use Boundwize\StructArmed\Architecture; | ||
| use Boundwize\StructArmed\Preset\Preset; | ||
| use Boundwize\StructArmed\Preset\Presets\Psr4Preset; | ||
|
|
||
| return Architecture::define() | ||
| ->skip([ | ||
| Psr4Preset::CLASSES_MUST_MATCH_COMPOSER => [ | ||
| __DIR__ . '/tests/system/Config/fixtures', | ||
| ], | ||
| ]) | ||
| ->cacheDirectory(is_dir('/tmp') ? '/tmp/structarmed' : null) | ||
| ->withPreset(Preset::PSR4()); |
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.