File tree Expand file tree Collapse file tree 3 files changed +31
-13
lines changed Expand file tree Collapse file tree 3 files changed +31
-13
lines changed Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ jobs:
279279 - *restore_cache
280280 - *yarn_install
281281
282- - run : ./scripts/install-angular-snapshots.sh
282+ - run : node ./scripts/install-angular-snapshots.js
283283 - run : ./scripts/circleci/run-local-browser-tests.sh
284284
285285# ----------------------------------------------------------------------------------------
@@ -303,6 +303,8 @@ workflows:
303303 - tests_local_browsers
304304 - tests_browserstack
305305 - tests_saucelabs
306+ # Testing
307+ - snapshot_tests_local_browsers
306308
307309 integration_tests :
308310 jobs :
Original file line number Diff line number Diff line change 1+ /*
2+ * Script that re-installs all Angular dependencies using the GitHub build snapshots. We need to
3+ * do this after the locked node modules have been installed because otherwise `--frozen-lockfile`
4+ * would complain about outdated lock files.
5+ */
6+
7+ const join = require ( 'path' ) . join ;
8+ const execSync = require ( 'child_process' ) . execSync ;
9+ const packageJson = require ( '../package.json' ) ;
10+
11+ // List of Angular packages that are specified in the "package.json". Packages will be listed
12+ // without the "@angular/" scope.
13+ const angularPackages = Object
14+ . keys ( { ...packageJson . dependencies , ...packageJson . devDependencies } )
15+ . filter ( depName => depName . startsWith ( '@angular/' ) )
16+ . map ( depName => depName . split ( '/' ) . slice ( 1 ) ) ;
17+
18+ // List of URLs that refer to the Github snapshot builds for all Angular packages.
19+ const githubBuildUrls = angularPackages . map ( name => `github:angular/${ name } -builds` ) ;
20+
21+ // Run yarn add {URLs}, so that it replaces the Angular npm packages with the Github builds.
22+ execSync ( `yarn add ${ githubBuildUrls . join ( ' ' ) } ` , {
23+ stdio : 'inherit' ,
24+ shell : true ,
25+ cwd : join ( __dirname , '../' )
26+ } ) ;
27+
28+ console . log ( 'Finished installing the Angular snapshot builds.' ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments