Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
22 changes: 20 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ jobs:
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}'
RUNNER_ENVIRONMENT: '${{ runner.environment }}'

steps:
# Shared ECS runners can retain root-owned files from an earlier
Expand Down Expand Up @@ -447,10 +446,20 @@ jobs:
npm run bundle

- name: 'Run CLI Integration Tests'
env:
# Mapped for integration-tests/vitest.config.ts, which caps each
# shared-pool shard at one fork and exempts pressure-flake
# unhandled errors.
RUNNER_ENVIRONMENT: '${{ runner.environment }}'
run: |-
npm run test:integration:cli:sandbox:none

- name: 'Run Interactive Integration Tests'
env:
# Mapped for integration-tests/vitest.config.ts, which caps each
# shared-pool shard at one fork and exempts pressure-flake
# unhandled errors.
RUNNER_ENVIRONMENT: '${{ runner.environment }}'
run: |-
npm run test:integration:interactive:sandbox:none

Expand All @@ -467,7 +476,6 @@ jobs:
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}'
RUNNER_ENVIRONMENT: '${{ runner.environment }}'

steps:
# Shared ECS runners can retain root-owned files from an earlier
Expand Down Expand Up @@ -530,12 +538,22 @@ jobs:
npm run build:sandbox -- -s

- name: 'Run CLI Docker Integration Tests'
env:
# Mapped for integration-tests/vitest.config.ts, which caps each
# shared-pool shard at one fork and exempts pressure-flake
# unhandled errors.
RUNNER_ENVIRONMENT: '${{ runner.environment }}'
run: |-
# The package.json docker test scripts each rebuild the sandbox image.
# Run vitest directly here so this job reuses the image built above.
QWEN_SANDBOX=docker npx vitest run --root ./integration-tests cli

- name: 'Run Interactive Docker Integration Tests'
env:
# Mapped for integration-tests/vitest.config.ts, which caps each
# shared-pool shard at one fork and exempts pressure-flake
# unhandled errors.
RUNNER_ENVIRONMENT: '${{ runner.environment }}'
run: |-
QWEN_SANDBOX=docker npx vitest run --root ./integration-tests interactive

Expand Down
28 changes: 24 additions & 4 deletions scripts/tests/release-workflow.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1204,10 +1204,30 @@ describe('release lane runner routing', () => {
});

it('passes the runner environment to integration test configuration', () => {
for (const name of ['integration_none', 'integration_docker']) {
expect(releaseYaml.jobs[name].env.RUNNER_ENVIRONMENT, name).toBe(
'${{ runner.environment }}',
);
// The `runner` context is not available in job-level `env:` — it expands
// to an empty string there (and fails actionlint), silently disabling the
// ECS limits. The mapping must sit on each step that starts a vitest run
// reading it in integration-tests/vitest.config.ts.
const integrationSteps = {
integration_none: [
'Run CLI Integration Tests',
'Run Interactive Integration Tests',
],
integration_docker: [
'Run CLI Docker Integration Tests',
'Run Interactive Docker Integration Tests',
],
};
for (const [name, stepNames] of Object.entries(integrationSteps)) {
const job = releaseYaml.jobs[name];
expect(job.env.RUNNER_ENVIRONMENT, name).toBeUndefined();
for (const stepName of stepNames) {
const step = job.steps.find((s) => s.name === stepName);
expect(step, `step missing from ${name}: ${stepName}`).toBeTruthy();
expect(step.env.RUNNER_ENVIRONMENT, `${name}/${stepName}`).toBe(
'${{ runner.environment }}',
);
}
}
});

Expand Down
Loading