Skip to content

Commit 97ca175

Browse files
arbrandesclaude
andcommitted
chore: add build:ci smoke test to verify webpack build
Adds an npm run build:ci script that exercises the real app graph through webpack, and wires it into the CI workflow after the existing build step. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b0c3e73 commit 97ca175

7 files changed

Lines changed: 34 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ jobs:
2828
run: npm run test
2929
- name: Build
3030
run: npm run build
31+
- name: Build (CI)
32+
run: npm run build:ci
3133
- name: i18n_extract
3234
run: npm run i18n_extract

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ build:
1717
done' sh {} +
1818
tsc-alias -p tsconfig.build.json
1919

20+
build-ci:
21+
SITE_CONFIG_PATH=site.config.ci.tsx openedx build
22+
2023
# turbo.site.json is the standalone turbo config for this package. It is
2124
# renamed to avoid conflicts with turbo v2's workspace validation, which
2225
# rejects root task syntax (//#) and requires "extends" in package-level

dev/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ window.open = (url, target, features) => {
2020
return originalWindowOpen(url, target, features);
2121
};
2222

23-
const devApp: App = {
23+
export const devApp: App = {
2424
appId: 'notifications-dev-site',
2525
routes: [{
2626
path: '/',
@@ -39,5 +39,3 @@ const devApp: App = {
3939
element: <LinkMenuItem label="Home" url="/" variant="navLink" />,
4040
}],
4141
};
42-
43-
export default devApp;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
},
3131
"scripts": {
3232
"build": "make build",
33+
"build:ci": "make build-ci",
3334
"build:packages": "make build-packages",
3435
"clean": "make clean",
3536
"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 { notificationsApp } from './src';
4+
5+
import '@openedx/frontend-base/shell/style';
6+
7+
const siteConfig: SiteConfig = {
8+
siteId: 'notifications-ci',
9+
siteName: 'Notifications (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+
notificationsApp,
21+
],
22+
};
23+
24+
export default siteConfig;

site.config.dev.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
shellApp,
77
} from '@openedx/frontend-base';
88

9-
import notificationsApp from './src/app';
10-
import devApp from './dev';
9+
import { notificationsApp } from './src';
10+
import { devApp } from './dev';
1111

1212
import '@openedx/frontend-base/shell/style';
1313

site.config.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { SiteConfig } from '@openedx/frontend-base';
22

3-
import notificationsApp from './src/app';
3+
import { notificationsApp } from './src';
44

55
const siteConfig: SiteConfig = {
66
siteId: 'notifications-test',

0 commit comments

Comments
 (0)