Skip to content

Commit

Permalink
Merge pull request #800 from getsentry/4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Nov 16, 2023
2 parents 9624a88 + a19357e commit 48c7977
Show file tree
Hide file tree
Showing 38 changed files with 929 additions and 1,264 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ on:
permissions:
contents: read

# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
phpunit:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
COMPOSER_NO_INTERACTION: 1

Expand All @@ -29,7 +34,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -55,14 +60,13 @@ jobs:
composer install --no-interaction --prefer-dist --no-progress
- name: Run phpunit
run: composer test:ci
run: vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload code coverage
uses: codecov/codecov-action@v3

phpunit-legacy:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
COMPOSER_NO_INTERACTION: 1

Expand Down Expand Up @@ -118,7 +122,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -130,8 +134,9 @@ jobs:
- name: Install Composer dependencies
run: |
# friendsofphp/php-cs-fixer: No need for this package to run phpunit and it conflicts with older Laravel versions
# livewire/livewire: Only supported on Laravel 7.0 and above
# laravel/folio: Only supported on PHP 8.1 + Laravel 10.0 and above
composer remove friendsofphp/php-cs-fixer laravel/folio --dev --no-interaction --no-update
composer remove friendsofphp/php-cs-fixer livewire/livewire laravel/folio --dev --no-interaction --no-update
# Require the correct versions we want to run phpunit for
composer require \
Expand All @@ -145,7 +150,7 @@ jobs:
composer install --no-interaction --prefer-dist --no-progress
- name: Run phpunit
run: composer test:ci
run: vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload code coverage
uses: codecov/codecov-action@v3
27 changes: 22 additions & 5 deletions .github/workflows/cs.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: CS
name: Code style and static analysis

on:
pull_request:
push:
branches:
- master
- release/**
- develop

permissions:
contents: read
Expand All @@ -16,16 +16,33 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none

- name: Install dependencies
run: composer update --no-progress --no-interaction --prefer-dist

- name: Run script
run: composer phpcs:ci
run: vendor/bin/php-cs-fixer fix --verbose --diff --dry-run

phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- name: Install dependencies
run: composer update --no-progress --no-interaction --prefer-dist

- name: Run script
run: vendor/bin/phpstan analyse
5 changes: 5 additions & 0 deletions .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
force:
description: Force a release even when there are release-blockers (optional)
required: false
merge_target:
description: Target branch to merge into. Uses the default branch as a fallback (optional)
required: false
default: master

permissions:
contents: read
Expand All @@ -30,3 +34,4 @@ jobs:
with:
version: ${{ github.event.inputs.version }}
force: ${{ github.event.inputs.force }}
merge_target: ${{ github.event.inputs.merge_target }}
31 changes: 0 additions & 31 deletions .github/workflows/static-analysis.yaml

This file was deleted.

0 comments on commit 48c7977

Please sign in to comment.