Skip to content

Commit 915fc4b

Browse files
committed
refactor: build starter kits before run
Build starter kits before run. This will fail early if project can not be build at all. This will also make run faster (app will be pre builds).
1 parent d3c54b4 commit 915fc4b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/templates/starter_kit_templates_tests.py

+7
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,27 @@ def tearDownClass(cls):
148148
@parameterized.expand(DEMOS)
149149
def test_000_prepare_apps(self, demo):
150150
Tns.create_app(demo, attributes={"--template": "https://github.com/NativeScript/" + demo})
151+
151152
Tns.platform_add_android(attributes={"--path": demo, "--frameworkPath": ANDROID_PACKAGE})
153+
152154
if "-ng" in demo:
153155
Tns.update_angular(demo)
154156
if "-ng" in demo or "-ts" in demo:
155157
Npm.uninstall(package="nativescript-dev-typescript", option='--save-dev', folder=demo)
156158
Npm.install(package=TYPESCRIPT_PACKAGE, option='--save-dev', folder=demo)
157159
Npm.uninstall(package="nativescript-dev-webpack", option='--save-dev', folder=demo)
160+
158161
# Old webpack adds old webpack config. Cleanup to make sure we get the new config.
159162
File.remove(os.path.join(TEST_RUN_HOME, demo, 'webpack.config.js'))
160163
Tns.install_npm(package=WEBPACK_PACKAGE, option='--save-dev', folder=demo)
161164
Npm.uninstall(package="nativescript-dev-sass", option='--save-dev', folder=demo)
162165
Npm.install(package=SASS_PACKAGE, option='--save-dev', folder=demo)
166+
167+
Tns.build_android(attributes={'--path': demo})
168+
163169
if CURRENT_OS == OSType.OSX:
164170
Tns.platform_add_ios(attributes={'--path': demo, '--frameworkPath': IOS_PACKAGE})
171+
Tns.build_ios(attributes={'--path': demo})
165172

166173
@parameterized.expand(DEMOS)
167174
def test_100_run_android(self, demo):

0 commit comments

Comments
 (0)