diff --git a/.craft.yml b/.craft.yml index 7cb921217..2b133fc7a 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,16 +1,16 @@ -minVersion: '0.9.0' +minVersion: 0.9.0 github: - owner: getsentry - repo: sentry-php + owner: getsentry + repo: sentry-php changelogPolicy: simple -statusProvider: - name: github +statusProvider: + name: github artifactProvider: name: none preReleaseCommand: "" targets: - - name: github - - name: registry - type: sdk - config: - canonical: 'composer:sentry/sentry' + - name: github + - name: registry + type: sdk + config: + canonical: 'composer:sentry/sentry' diff --git a/.editorconfig b/.editorconfig index f2a39827d..5862f92a8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,5 +13,8 @@ indent_size = 4 [*.md] max_line_length = 80 +[*.{yml, yaml}] +indent_size = 2 + [COMMIT_EDITMSG] max_line_length = 0 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b59deb5b9..14c0dcc4d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,67 +1,69 @@ name: CI on: - pull_request: - push: - branches: - - master - - develop + pull_request: + push: + branches: + - master + - develop jobs: - tests: - name: Tests - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: - - ubuntu-latest - - windows-latest - php: - - '7.2' - - '7.3' - - '7.4' - - '8.0' - dependencies: - - lowest - - highest + tests: + name: Tests + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - windows-latest + php: + - '7.2' + - '7.3' + - '7.4' + - '8.0' + dependencies: + - lowest + - highest - steps: - - name: Checkout - uses: actions/checkout@v2 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 2 - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: xdebug + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: xdebug - - name: Setup Problem Matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Setup Problem Matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Determine Composer cache directory - id: composer-cache - run: echo "::set-output name=directory::$(composer config cache-dir)" + - name: Determine Composer cache directory + id: composer-cache + run: echo "::set-output name=directory::$(composer config cache-dir)" - - name: Cache Composer dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.directory }} - key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.dependencies }}-composer- + - name: Cache Composer dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.directory }} + key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.dependencies }}-composer- - - name: Install highest dependencies - run: composer update --no-progress --no-interaction --prefer-dist - if: ${{ matrix.dependencies == 'highest' }} + - name: Install highest dependencies + run: composer update --no-progress --no-interaction --prefer-dist + if: ${{ matrix.dependencies == 'highest' }} - - name: Install lowest dependencies - run: composer update --no-progress --no-interaction --prefer-dist --prefer-lowest - if: ${{ matrix.dependencies == 'lowest' }} + - name: Install lowest dependencies + run: composer update --no-progress --no-interaction --prefer-dist --prefer-lowest + if: ${{ matrix.dependencies == 'lowest' }} - - name: Run tests - run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml + - name: Run tests + run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml - - name: Upload code coverage - uses: codecov/codecov-action@v1 - with: - file: build/coverage-report.xml + - name: Upload code coverage + uses: codecov/codecov-action@v1 + with: + file: build/coverage-report.xml diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml index 6371a4ace..ea19fe8d9 100644 --- a/.github/workflows/publish-release.yaml +++ b/.github/workflows/publish-release.yaml @@ -1,29 +1,29 @@ name: Prepare Release on: - workflow_dispatch: - inputs: - version: - description: Version to release - required: true - force: - description: Force a release even when there are release-blockers (optional) - required: false + workflow_dispatch: + inputs: + version: + description: Version to release + required: true + force: + description: Force a release even when there are release-blockers (optional) + required: false jobs: - release: - runs-on: ubuntu-latest - name: Release version - steps: - - uses: actions/checkout@v2 - with: - token: ${{ secrets.GH_RELEASE_PAT }} - fetch-depth: 0 + release: + runs-on: ubuntu-latest + name: Release version + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.GH_RELEASE_PAT }} + fetch-depth: 0 - - name: Prepare release - uses: getsentry/action-prepare-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }} - with: - version: ${{ github.event.inputs.version }} - force: ${{ github.event.inputs.force }} + - name: Prepare release + uses: getsentry/action-prepare-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }} + with: + version: ${{ github.event.inputs.version }} + force: ${{ github.event.inputs.force }} diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml index 12ae66997..60a9fcd1a 100644 --- a/.github/workflows/static-analysis.yaml +++ b/.github/workflows/static-analysis.yaml @@ -1,59 +1,59 @@ name: Code style and static analysis on: - pull_request: - push: - branches: - - master - - develop + pull_request: + push: + branches: + - master + - develop jobs: - php-cs-fixer: - name: PHP-CS-Fixer - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '7.4' - - - name: Install dependencies - run: composer update --no-progress --no-interaction --prefer-dist - - - name: Run script - run: composer phpcs - - phpstan: - name: PHPStan - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - - - name: Install dependencies - run: composer update --no-progress --no-interaction --prefer-dist - - - name: Run script - run: composer phpstan - - psalm: - name: Psalm - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - - - name: Install dependencies - run: composer update --no-progress --no-interaction --prefer-dist - - - name: Run script - run: composer psalm + php-cs-fixer: + name: PHP-CS-Fixer + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + + - name: Install dependencies + run: composer update --no-progress --no-interaction --prefer-dist + + - name: Run script + run: composer phpcs + + phpstan: + name: PHPStan + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + + - name: Install dependencies + run: composer update --no-progress --no-interaction --prefer-dist + + - name: Run script + run: composer phpstan + + psalm: + name: Psalm + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + + - name: Install dependencies + run: composer update --no-progress --no-interaction --prefer-dist + + - name: Run script + run: composer psalm diff --git a/codecov.yml b/codecov.yml index 0d992425c..b8989a5a7 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,5 +1,5 @@ comment: false ignore: - - tests/data - - tests/resources - - tests/Fixtures + - tests/data + - tests/resources + - tests/Fixtures