chore: remove checkout step for base branch #19
Workflow file for this run
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
| # 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 | |
| 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 | |
| - 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 |