Skip to content

Commit 65c13df

Browse files
arbrandesclaude
andcommitted
chore: add build:ci smoke test to verify webpack build
Adds a build-ci make target (exposed as npm run build:ci) that runs openedx build against site.config.dev.tsx, and wires it into the CI workflow after the existing tsc-based build step. Catches errors in the real app graph (e.g. broken imports in lazy-loaded routes) that neither tsc nor Jest would surface. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d859ebf commit 65c13df

5 files changed

Lines changed: 38 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
- name: Build
3939
run: npm run build
4040

41+
- name: Build (CI)
42+
run: npm run build:ci
43+
4144
- name: Run Code Coverage
4245
uses: codecov/codecov-action@v5
4346
with:

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ build:
4545
cp "$$f" "$$d"; \
4646
done' sh {} +
4747

48+
build-ci:
49+
SITE_CONFIG_PATH=site.config.ci.tsx openedx build
50+
4851
extract_translations: | requirements
4952
# Pulling display strings from source files into src/i18n/transifex_input.json...
5053
npm run i18n_extract

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
},
3434
"scripts": {
3535
"build": "make build",
36+
"build:ci": "make build-ci",
3637
"build:packages": "make build-packages",
3738
"clean": "make clean",
3839
"clean:packages": "make clean-packages",

site.config.ci.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { EnvironmentTypes, SiteConfig, footerApp, headerApp, shellApp } from '@openedx/frontend-base';
2+
3+
import { authnApp } from './src';
4+
5+
import '@openedx/frontend-base/shell/style';
6+
7+
const siteConfig: SiteConfig = {
8+
siteId: 'authn-ci',
9+
siteName: 'Authn CI',
10+
baseUrl: 'http://apps.local.openedx.io',
11+
lmsBaseUrl: 'http://local.openedx.io',
12+
loginUrl: 'http://local.openedx.io/login',
13+
logoutUrl: 'http://local.openedx.io/logout',
14+
15+
environment: EnvironmentTypes.PRODUCTION,
16+
apps: [
17+
shellApp,
18+
headerApp,
19+
footerApp,
20+
authnApp,
21+
],
22+
};
23+
24+
export default siteConfig;

site.config.dev.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EnvironmentTypes, SiteConfig } from '@openedx/frontend-base';
1+
import { EnvironmentTypes, SiteConfig, footerApp, headerApp, shellApp } from '@openedx/frontend-base';
22

33
import { authnApp } from './src';
44

@@ -13,7 +13,12 @@ const siteConfig: SiteConfig = {
1313
logoutUrl: 'http://local.openedx.io:8000/logout',
1414

1515
environment: EnvironmentTypes.DEVELOPMENT,
16-
apps: [authnApp],
16+
apps: [
17+
shellApp,
18+
headerApp,
19+
footerApp,
20+
authnApp,
21+
],
1722
};
1823

1924
export default siteConfig;

0 commit comments

Comments
 (0)