Skip to content

Commit 976bee2

Browse files
Support Copilot agent test env loading
1 parent 55323e5 commit 976bee2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ jobs:
8181
- name: Install dependencies
8282
run: composer install --prefer-dist --no-progress --no-interaction
8383

84+
- name: Mark Copilot session
85+
run: echo "COPILOT_CODING_AGENT=true" >> "$GITHUB_ENV"
86+
8487
- name: Smoke test feature suite (MySQL + Redis)
8588
env:
8689
APP_KEY: base64:i3g6f+dV8FfsIkcxqd7gbiPn2oXk5r00sTmdD6V5utI=

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ abstract class TestCase extends BaseTestCase
1717

1818
public static function setUpBeforeClass(): void
1919
{
20-
if (getenv('GITHUB_ACTIONS') !== 'true') {
20+
if (getenv('GITHUB_ACTIONS') !== 'true' || getenv('COPILOT_CODING_AGENT') === 'true') {
2121
if (TestSuiteSubscriber::getCurrentSuite() === 'feature') {
2222
Dotenv::createImmutable(__DIR__, '.env.feature')->safeLoad();
2323
} elseif (TestSuiteSubscriber::getCurrentSuite() === 'unit') {

0 commit comments

Comments
 (0)