Skip to content

Commit 52e121b

Browse files
jonphippsclaude
andcommitted
fix: remove localhost from valid environments, replace with local
- Fixed e2e test files to remove 'localhost' from valid environment lists - Updated site-validation.yml to use 'local' instead of 'localhost' - Corrected environment mappings to only include valid environments - Valid environments: local, preview, development, production 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 7249777 commit 52e121b

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

.github/workflows/deploy-dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ jobs:
8686
if: steps.affected.outputs.has-affected == 'true'
8787
run: |
8888
if [ "${{ inputs.force_build_all }}" = "true" ]; then
89-
nx run-many --target=build --all --parallel=1 --configuration=dev
89+
nx run-many --target=build --all --parallel=1 --configuration=development
9090
else
91-
nx affected --target=build --parallel=1 --configuration=dev
91+
nx affected --target=build --parallel=1 --configuration=development
9292
fi
9393
env:
94-
DOCS_ENV: dev
94+
DOCS_ENV: development
9595
NODE_ENV: production
9696
BASE_URL_PREFIX: /standards-dev/
9797

.github/workflows/site-validation.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ on:
66
environment:
77
description: 'Environment to test'
88
required: true
9-
default: 'dev'
9+
default: 'development'
1010
type: choice
1111
options:
12-
- localhost
13-
- dev
12+
- local
13+
- development
1414
- preview
1515
- production
1616
test_affected_only:
@@ -78,18 +78,18 @@ jobs:
7878
echo "has-sites=true" >> $GITHUB_OUTPUT
7979
fi
8080
81-
- name: Build sites for localhost testing
82-
if: inputs.environment == 'localhost' && steps.sites.outputs.has-sites == 'true'
81+
- name: Build sites for local testing
82+
if: inputs.environment == 'local' && steps.sites.outputs.has-sites == 'true'
8383
run: |
8484
if [ "${{ inputs.test_affected_only }}" = "true" ]; then
8585
echo "Building affected sites only..."
86-
nx affected --target=build --parallel=1 --configuration=localhost
86+
nx affected --target=build --parallel=1 --configuration=local
8787
else
8888
echo "Building all sites..."
89-
nx run-many --target=build --all --parallel=1 --configuration=localhost
89+
nx run-many --target=build --all --parallel=1 --configuration=local
9090
fi
9191
env:
92-
DOCS_ENV: localhost
92+
DOCS_ENV: local
9393

9494
- name: Install Playwright Browsers
9595
if: steps.sites.outputs.has-sites == 'true'

e2e/docs-env-validation.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ test.describe('DOCS_ENV Validation Tests', () => {
3939
});
4040

4141
test('should accept valid DOCS_ENV values', async () => {
42-
const validValues = ['local', 'localhost', 'preview', 'dev', 'production'];
42+
const validValues = ['local', 'preview', 'development', 'production'];
4343
const originalDocsEnv = process.env.DOCS_ENV;
4444

4545
for (const validValue of validValues) {
@@ -65,9 +65,8 @@ test.describe('DOCS_ENV Validation Tests', () => {
6565
test('should map DOCS_ENV values correctly', async () => {
6666
const mappings = {
6767
'local': 'local',
68-
'localhost': 'local',
6968
'preview': 'preview',
70-
'dev': 'development',
69+
'development': 'development',
7170
'production': 'production'
7271
};
7372

e2e/environment-fallback.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test.describe('Environment Configuration Tests', () => {
1818
expect(docsEnvMatch, 'DOCS_ENV should be set in root .env').toBeTruthy();
1919

2020
const docsEnvValue = docsEnvMatch![1].trim();
21-
const validValues = ['local', 'localhost', 'preview', 'dev', 'production'];
21+
const validValues = ['local', 'preview', 'development', 'production'];
2222
expect(validValues, `DOCS_ENV value '${docsEnvValue}' should be valid`).toContain(docsEnvValue);
2323
});
2424

0 commit comments

Comments
 (0)