Repository navigation
feat: feature flags on OpenFeature — v26.10.1 (#12) #46
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| quality: | |
| name: Quality (PHP ${{ matrix.php }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [ '8.3', '8.4', '8.5' ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Package metadata | |
| run: | | |
| composer validate --strict | |
| composer mono-validate | |
| - name: Install exported library in a clean consumer | |
| run: composer test:package | |
| - name: Pint (code style) | |
| run: composer pint-test | |
| - name: PHPStan (level max) | |
| run: composer stan | |
| - name: Pest (unit) | |
| run: composer test | |
| - name: Deptrac (architecture) | |
| run: composer deptrac | |
| browser: | |
| name: Browser (Pest + Playwright) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: npm | |
| - name: Install Playwright | |
| run: | | |
| npm ci | |
| npx playwright install --with-deps chromium | |
| - name: Pest (browser) | |
| run: composer test:browser | |
| - name: Upload screenshots | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: browser-screenshots | |
| path: tests/Browser/Screenshots | |
| retention-days: 14 | |
| if-no-files-found: warn | |
| docs: | |
| name: Docs (site + bilingual books) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/build-docs | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: books | |
| path: site/downloads/ | |
| if-no-files-found: error | |
| - uses: actions/upload-pages-artifact@v4 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| with: | |
| path: site/ | |
| pages: | |
| name: Publish documentation | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| needs: [quality, browser, docs, guard] | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: github-pages | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Skip a superseded main build | |
| id: current | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const head = await github.rest.repos.getCommit({...context.repo, ref: 'main'}); | |
| return head.data.sha === context.sha; | |
| - uses: actions/configure-pages@v5 | |
| if: steps.current.outputs.result == 'true' | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 | |
| if: steps.current.outputs.result == 'true' | |
| guard: | |
| name: Pre-push safety guard | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: No sensitive tracked/staged paths | |
| run: bash scripts/check-no-sensitive-tracked.sh |