Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore test workflows #183

Merged
merged 7 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/maze-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.0']
symfony-version: [4, 5, 6]
include:
- php-version: '7.2'
symfony-version: 2
- php-version: '8.3'
symfony-version: 7
php-version: ['8.0', '8.1', '8.2', '8.3', '8.4']
symfony-version: [5, 6, 7]
exclude:
- php-version: 8.0
symfony-version: 7
- php-version: 8.1
symfony-version: 7

steps:
- uses: actions/checkout@v2

- name: Install libcurl4-openssl-dev and net-tools
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install net-tools
sudo apt-get -y install libcurl4-openssl-dev
sudo apt-get -y install net-tools

- name: install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
ruby-version: '3.2.3'
bundler-cache: true

- run: bundle exec maze-runner --no-source
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ jobs:
symfony-version: '^6.0'
- php-version: '8.3'
symfony-version: '^7.0'
- php-version: '8.3'
- php-version: '8.4'
symfony-version: '^5.0'
- php-version: '8.4'
symfony-version: '^6.0'
- php-version: '8.4'
symfony-version: '^7.0'
- php-version: '8.4'
symfony-version: 'latest'

steps:
Expand All @@ -120,7 +126,7 @@ jobs:
if: ${{ matrix.symfony-version == 'latest' }}
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.13'

- run: composer validate

Expand Down
12 changes: 6 additions & 6 deletions DependencyInjection/ClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ class ClientFactory
*/
public function __construct(
SymfonyResolver $resolver,
TokenStorageInterface $tokens = null,
AuthorizationCheckerInterface $checker = null,
$tokens = null,
$checker = null,
$key = null,
$endpoint = null,
$callbacks = true,
Expand All @@ -278,12 +278,12 @@ public function __construct(
$root = null,
$env = null,
$stage = null,
array $stages = null,
array $filters = null,
ShutdownStrategyInterface $shutdownStrategy = null,
$stages = null,
$filters = null,
$shutdownStrategy = null,
$stripPathRegex = null,
$projectRootRegex = null,
GuzzleHttp\ClientInterface $guzzle = null,
$guzzle = null,
$memoryLimitIncrease = false,
array $discardClasses = [],
array $redactedKeys = [],
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://rubygems.org'

gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v6.9.0'
gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v9.22.0'
gem 'webrick'
2 changes: 1 addition & 1 deletion features/custom-guzzle.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Scenario: Custom Guzzle client is not used when config is not setup
When I navigate to the route "/unhandled/controller/exception"
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
And the error "X-Custom-Guzzle" header is null
And the error "X-Custom-Guzzle" header is not present

Scenario: A custom Guzzle client can be used
Given I set environment variable "BUGSNAG_GUZZLE" to "custom_guzzle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function bigOom(): Response
*/
public function smallOom(): Response
{
ini_set('memory_limit', memory_get_usage() + (1024 * 1024 * 5));
ini_set('memory_limit', memory_get_usage() + (1024 * 1024 * 10));
ini_set('display_errors', true);

$i = 0;
Expand Down
9 changes: 5 additions & 4 deletions features/fixtures/symfony-6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ ENV BUGSNAG_DISCARD_CLASSES $BUGSNAG_DISCARD_CLASSES
ENV BUGSNAG_GUZZLE $BUGSNAG_GUZZLE
ENV BUGSNAG_FEATURE_FLAGS $BUGSNAG_FEATURE_FLAGS
ENV COMPOSER_GITHUB_TOKEN $COMPOSER_GITHUB_TOKEN
ENV BUGSNAG_MEMORY_LIMIT_INCREASE 10485760

RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
zip \
unzip
apt-get install -y --no-install-recommends \
git \
zip \
unzip

COPY . .
COPY --from=composer:2.2 /usr/bin/composer /usr/local/bin/composer
Expand Down
6 changes: 2 additions & 4 deletions features/ooms.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Feature: Out of memory error support
Scenario: OOM from a single large allocation
Given I start the symfony fixture
When I navigate to the route "/oom/big"
Then the Symfony response matches "Allowed memory size of \d+ bytes exhausted \(tried to allocate \d+ bytes\)"
When I wait to receive an error
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
And the exception "errorClass" equals "Symfony\Component\ErrorHandler\Error\OutOfMemoryError"
And the exception "message" matches "Allowed memory size of \d+ bytes exhausted \(tried to allocate \d+ bytes\)"
Expand All @@ -26,8 +25,7 @@ Scenario: OOM from many small allocations
Given I set environment variable "APP_DEBUG" to "0"
And I start the symfony fixture
When I navigate to the route "/oom/small"
Then the Symfony response matches "Allowed memory size of \d+ bytes exhausted \(tried to allocate \d+ bytes\)"
When I wait to receive an error
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Bugsnag Symfony" notifier
And the exception "errorClass" equals "Symfony\Component\ErrorHandler\Error\OutOfMemoryError"
And the exception "message" matches "Allowed memory size of \d+ bytes exhausted \(tried to allocate \d+ bytes\)"
Expand Down
Loading