update #3
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: Capacity Planning | |
| on: | |
| push: | |
| paths: | |
| - 'Capacity_Planning/**' | |
| - '.github/workflows/capacity-planning.yml' | |
| pull_request: | |
| paths: | |
| - 'Capacity_Planning/**' | |
| - '.github/workflows/capacity-planning.yml' | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: capacity-planning-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| php: | |
| name: PHP ${{ matrix.php }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] | |
| defaults: | |
| run: | |
| working-directory: Capacity_Planning | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: none | |
| - name: Syntax check runtime and tests | |
| run: find Module.php actions lib views tests -type f -name '*.php' -print0 | xargs -0 -n1 php -l | |
| - name: Calculation regressions | |
| run: php tests/CapacityPlanningMathTest.php | |
| - name: Cache regressions | |
| run: php tests/CapacityPlanningCacheTest.php | |
| ui: | |
| name: Chromium UI | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: Capacity_Planning | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: npm | |
| cache-dependency-path: Capacity_Planning/package-lock.json | |
| - run: npm ci | |
| - run: npx playwright install --with-deps chromium | |
| - name: Resolve locked Chromium executable | |
| run: node -e "console.log('PLAYWRIGHT_CHROMIUM_EXECUTABLE=' + require('playwright').chromium.executablePath())" >> "$GITHUB_ENV" | |
| - name: Verify release identity | |
| run: npm run test:build | |
| - name: Browser regressions | |
| run: npm run test:ui |