Wire PAM-002-P2 ContextPulse fields from live Sirus context/environment data #262
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
| name: Code Quality & Auto-Fix | |
| on: | |
| push: | |
| branches: [ universe, main ] | |
| pull_request: | |
| branches: [ universe, main ] | |
| jobs: | |
| php-quality: | |
| name: PHP Code Quality | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Authenticate git for private org packages | |
| env: | |
| TOKEN: ${{ secrets.COPILOT_MCP_TOKEN }} | |
| run: | | |
| if [ -n "${TOKEN}" ]; then | |
| git config --global --add url."https://x-access-token:${TOKEN}@github.com/Starisian-Technologies/".insteadOf "https://github.com/Starisian-Technologies/" | |
| git config --global --add url."https://x-access-token:${TOKEN}@github.com/Starisian-Technologies/".insteadOf "git@github.com:Starisian-Technologies/" | |
| else | |
| echo "No COPILOT_MCP_TOKEN provided; skipping git authentication rewrite for Starisian-Technologies." | |
| fi | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f | |
| with: | |
| php-version: '8.3' | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - name: Install PHP dependencies | |
| run: composer install --prefer-dist --no-interaction --no-progress | |
| - name: Run PHPCS | |
| run: composer phpcs || true | |
| - name: Run PHPStan | |
| run: composer phpstan || true | |
| - name: Run Rector (dry-run) | |
| run: composer rector || true | |
| js-quality: | |
| name: JavaScript/CSS Code Quality | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 | |
| with: | |
| version: 8.6.0 | |
| - name: Cache pnpm dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.pnpm-store | |
| key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm- | |
| - name: Install Node dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run ESLint | |
| run: pnpm run lint:js || true | |
| - name: Run Stylelint | |
| run: pnpm run lint:css || true | |
| auto-fix: | |
| name: Auto-Fix Code Issues | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/universe' | |
| needs: [php-quality, js-quality] | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f | |
| with: | |
| php-version: '8.3' | |
| tools: composer:v2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 | |
| with: | |
| version: 8.6.0 | |
| - name: Install dependencies | |
| run: | | |
| composer install --prefer-dist --no-interaction | |
| pnpm install --frozen-lockfile | |
| - name: Run Rector fixes | |
| run: composer rector:fix || true | |
| - name: Run PHP CS Fixer | |
| run: composer phpfix || true | |
| - name: Run PHPCBF | |
| run: composer phpcbf || true | |
| - name: Run ESLint fixes | |
| run: pnpm run lint:fix || true | |
| - name: Run Stylelint fixes | |
| run: pnpm run stylelint:fix || true | |
| - name: Run Prettier | |
| run: pnpm run format || true | |
| - name: Commit and push changes | |
| uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 | |
| with: | |
| commit_message: "style: auto-fix code quality issues [skip ci]" | |
| commit_user_name: "github-actions[bot]" | |
| commit_user_email: "github-actions[bot]@users.noreply.github.com" | |
| branch: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | |
| file_pattern: "src/**/*.php src/**/*.js src/**/*.css" |