docs: add kun-init 4-file documentation structure (#33) #35
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: Continuous Integration | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [ opened, synchronize, reopened ] | |
| env: | |
| fail-fast: true | |
| jobs: | |
| checks: | |
| name: Code Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.4 | |
| coverage: none | |
| tools: composer-dependency-analyser, composer-normalize, composer-require-checker | |
| - name: Install Composer Dependencies | |
| uses: ramsey/composer-install@v3 | |
| with: | |
| dependency-versions: "highest" | |
| composer-options: "--prefer-stable --optimize-autoloader --no-progress --no-interaction" | |
| - name: Run Composer Dependency Analyser | |
| run: composer-dependency-analyser | |
| - name: Run Composer Require Checker | |
| run: composer-require-checker | |
| - name: Run Composer Normalize | |
| run: composer-normalize --dry-run --indent-size 2 --indent-style space --no-check-lock --no-update-lock | |
| - name: Run code style sniffer | |
| run: vendor/bin/phpcs --standard=phpcs.xml Kununu/ tests/ | |
| - name: Run PHP CS Fixer | |
| run: vendor/bin/php-cs-fixer check --using-cache=no --config php-cs-fixer.php | |
| - name: Run PHPStan | |
| run: vendor/bin/phpstan analyse | |
| - name: Run Psalm | |
| run: vendor/bin/psalm --no-cache | |
| - name: Run Rector | |
| run: vendor/bin/rector process --ansi --dry-run --config rector.php Kununu/ tests/ | |
| build: | |
| needs: checks | |
| name: PHPUnit | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| dependencies: | |
| - lowest | |
| - highest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.4 | |
| coverage: pcov | |
| - name: Install Composer Dependencies | |
| uses: ramsey/composer-install@v3 | |
| with: | |
| dependency-versions: ${{ matrix.dependencies }} | |
| composer-options: "--prefer-stable --optimize-autoloader --no-progress --no-interaction" | |
| - name: Run PHPUnit | |
| run: | | |
| vendor/bin/phpunit --colors=always --testdox \ | |
| --log-junit tests/.results/tests-junit.xml \ | |
| --coverage-clover tests/.results/tests-clover.xml | |
| - name: Upload coverage files | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ github.job }}-8.4-${{ matrix.dependencies }}-coverage | |
| include-hidden-files: true | |
| path: tests/.results/ | |
| sonarcloud: | |
| needs: build | |
| name: SonarCloud Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: build-8.4-highest-coverage | |
| path: tests/.results/ | |
| - name: Fix Code Coverage Paths | |
| working-directory: tests/.results/ | |
| run: | | |
| sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' tests-clover.xml | |
| sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' tests-junit.xml | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarqube-scan-action@v7.0.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |