Skip to content

Add a test context #342

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
17 changes: 16 additions & 1 deletion .castor/docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ function create_default_context(): Context
#[AsContext(name: 'ci')]
function create_ci_context(): Context
{
$c = create_default_context();
$c = create_test_context();

return $c
->withData([
Expand All @@ -381,6 +381,21 @@ function create_ci_context(): Context
;
}

#[AsContext(name: 'test')]
function create_test_context(): Context
{
$c = create_default_context();

return $c
->withData([
// override the default context here
])
->withEnvironment([
'APP_ENV' => 'test',
])
;
}

/**
* @param list<string> $subCommand
* @param list<string> $profiles
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* Update NodeJS to version 20.x LTS
* Upgrade base to Debian Bookworm (12.5)
* Add support for autocomplete (composer & symfony)
* Add a `test` context

## 3.11.0 (2023-05-30)

Expand Down
1 change: 1 addition & 0 deletions infrastructure/docker/docker-compose.builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
depends_on:
- postgres
environment:
- APP_ENV=${APP_ENV:-dev}
- COMPOSER_MEMORY_LIMIT=-1
- UID=${USER_ID}
# The following list contains the common environment variables exposed by CI platforms
Expand Down