Introduce OpenSearch 2.x fixtures #124
Workflow file for this run
This file contains 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: | |
- master | |
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.3 | |
coverage: none | |
- 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 PHP CS Fixer | |
run: vendor/bin/php-cs-fixer check --using-cache=no --config vendor/kununu/scripts/src/PHP/CodeStandards/Scripts/php_cs src/ tests/ | |
- name: Run Rector | |
run: vendor/bin/rector process --ansi --dry-run --config rector-ci.php src/ tests/ | |
- name: Run PHPStan | |
run: vendor/bin/phpstan analyse --ansi | |
build: | |
needs: checks | |
name: PHPUnit | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: | |
- 8.3 | |
dependencies: | |
- lowest | |
- highest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
coverage: pcov | |
- name: Install Composer Dependencies | |
uses: ramsey/composer-install@v3 | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
composer-options: "--prefer-stable" | |
- 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 }}-${{ matrix.php-version }}-${{ 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: | |
# Disabling shallow clone is recommended for improving relevancy of reporting | |
fetch-depth: 0 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build-8.3-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/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |