Feat: added headless singleRun script in package.json and in build pipeline

This commit is contained in:
lorenzo 2020-03-16 12:34:23 +01:00
parent 0b605f5e1e
commit b0d60d07c8
3 changed files with 38 additions and 35 deletions

View file

@ -22,6 +22,7 @@ jobs:
- run: npm install - run: npm install
- run: npm run pack - run: npm run pack
- run: npm run test:headless:singleRun
- run: cp README.md ./src/lib/dist/README.md - run: cp README.md ./src/lib/dist/README.md
- uses: JS-DevTools/npm-publish@v1 - uses: JS-DevTools/npm-publish@v1
with: with:

71
.idea/workspace.xml generated
View file

@ -2,9 +2,8 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="6d9e6998-eced-4f47-8fb4-3257db3e18e7" name="Default" comment="Version upgrade 1.2.8"> <list default="true" id="6d9e6998-eced-4f47-8fb4-3257db3e18e7" name="Default" comment="Version upgrade 1.2.8">
<change beforePath="$PROJECT_DIR$/.github/workflows/npmpub.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.github/workflows/npmpub.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" /> <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@ -53,7 +52,7 @@
<recent name="$PROJECT_DIR$/examples/dev" /> <recent name="$PROJECT_DIR$/examples/dev" />
</key> </key>
</component> </component>
<component name="RunManager" selected="npm.pack"> <component name="RunManager" selected="npm.test:headless:singleRun">
<configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true"> <configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/src/lib/package.json" /> <package-json value="$PROJECT_DIR$/src/lib/package.json" />
<command value="run" /> <command value="run" />
@ -84,16 +83,6 @@
<envs /> <envs />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="start (1)" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="start" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<configuration name="test (1)" type="js.build_tools.npm" temporary="true" nameIsGenerated="true"> <configuration name="test (1)" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" /> <package-json value="$PROJECT_DIR$/package.json" />
<command value="run" /> <command value="run" />
@ -104,20 +93,30 @@
<envs /> <envs />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="test:headless:singleRun" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="test:headless:singleRun" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<list> <list>
<item itemvalue="npm.start (1)" />
<item itemvalue="npm.test (1)" /> <item itemvalue="npm.test (1)" />
<item itemvalue="npm.build" /> <item itemvalue="npm.build" />
<item itemvalue="npm.publish" /> <item itemvalue="npm.publish" />
<item itemvalue="npm.pack" /> <item itemvalue="npm.pack" />
<item itemvalue="npm.test:headless:singleRun" />
</list> </list>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="npm.test:headless:singleRun" />
<item itemvalue="npm.pack" /> <item itemvalue="npm.pack" />
<item itemvalue="npm.publish" /> <item itemvalue="npm.publish" />
<item itemvalue="npm.build" /> <item itemvalue="npm.build" />
<item itemvalue="npm.test (1)" /> <item itemvalue="npm.test (1)" />
<item itemvalue="npm.start (1)" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
@ -155,7 +154,9 @@
<workItem from="1572945589004" duration="252000" /> <workItem from="1572945589004" duration="252000" />
<workItem from="1581498853844" duration="6408000" /> <workItem from="1581498853844" duration="6408000" />
<workItem from="1581516389687" duration="1254000" /> <workItem from="1581516389687" duration="1254000" />
<workItem from="1584040192080" duration="5962000" /> <workItem from="1584040192080" duration="6735000" />
<workItem from="1584358226923" duration="31000" />
<workItem from="1584358330750" duration="76000" />
</task> </task>
<task id="LOCAL-00001" summary="Ref: clean code&#10;Ref: update examples"> <task id="LOCAL-00001" summary="Ref: clean code&#10;Ref: update examples">
<created>1557130876740</created> <created>1557130876740</created>
@ -223,30 +224,30 @@
<screen x="1920" y="960" width="1920" height="1080" /> <screen x="1920" y="960" width="1920" height="1080" />
</state> </state>
<state x="2613" y="1249" width="524" height="509" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584044666474" /> <state x="2613" y="1249" width="524" height="509" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584044666474" />
<state width="1897" height="242" key="GridCell.Tab.0.bottom" timestamp="1584046025683"> <state width="1897" height="222" key="GridCell.Tab.0.bottom" timestamp="1584358257559">
<screen x="1920" y="960" width="1920" height="1080" /> <screen x="0" y="27" width="1920" height="1011" />
</state> </state>
<state width="1897" height="242" key="GridCell.Tab.0.bottom/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@0.219.1920.1080" timestamp="1584040732589" /> <state width="1897" height="242" key="GridCell.Tab.0.bottom/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@0.219.1920.1080" timestamp="1584040732589" />
<state width="1897" height="242" key="GridCell.Tab.0.bottom/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584046025683" /> <state width="1897" height="242" key="GridCell.Tab.0.bottom/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584046993665" />
<state width="1897" height="242" key="GridCell.Tab.0.bottom/0.27.1920.1011/1920.0.1920.1080@0.27.1920.1011" timestamp="1581516934990" /> <state width="1897" height="222" key="GridCell.Tab.0.bottom/0.27.1920.1011/1920.0.1920.1080@0.27.1920.1011" timestamp="1584358257559" />
<state width="1897" height="242" key="GridCell.Tab.0.center" timestamp="1584046025683"> <state width="1897" height="222" key="GridCell.Tab.0.center" timestamp="1584358257558">
<screen x="1920" y="960" width="1920" height="1080" /> <screen x="0" y="27" width="1920" height="1011" />
</state> </state>
<state width="1897" height="242" key="GridCell.Tab.0.center/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@0.219.1920.1080" timestamp="1584040732589" /> <state width="1897" height="242" key="GridCell.Tab.0.center/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@0.219.1920.1080" timestamp="1584040732589" />
<state width="1897" height="242" key="GridCell.Tab.0.center/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584046025683" /> <state width="1897" height="242" key="GridCell.Tab.0.center/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584046993665" />
<state width="1897" height="242" key="GridCell.Tab.0.center/0.27.1920.1011/1920.0.1920.1080@0.27.1920.1011" timestamp="1581516934990" /> <state width="1897" height="222" key="GridCell.Tab.0.center/0.27.1920.1011/1920.0.1920.1080@0.27.1920.1011" timestamp="1584358257558" />
<state width="1897" height="242" key="GridCell.Tab.0.left" timestamp="1584046025683"> <state width="1897" height="222" key="GridCell.Tab.0.left" timestamp="1584358257558">
<screen x="1920" y="960" width="1920" height="1080" /> <screen x="0" y="27" width="1920" height="1011" />
</state> </state>
<state width="1897" height="242" key="GridCell.Tab.0.left/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@0.219.1920.1080" timestamp="1584040732588" /> <state width="1897" height="242" key="GridCell.Tab.0.left/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@0.219.1920.1080" timestamp="1584040732588" />
<state width="1897" height="242" key="GridCell.Tab.0.left/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584046025683" /> <state width="1897" height="242" key="GridCell.Tab.0.left/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584046993665" />
<state width="1897" height="242" key="GridCell.Tab.0.left/0.27.1920.1011/1920.0.1920.1080@0.27.1920.1011" timestamp="1581516934990" /> <state width="1897" height="222" key="GridCell.Tab.0.left/0.27.1920.1011/1920.0.1920.1080@0.27.1920.1011" timestamp="1584358257558" />
<state width="1897" height="242" key="GridCell.Tab.0.right" timestamp="1584046025683"> <state width="1897" height="222" key="GridCell.Tab.0.right" timestamp="1584358257558">
<screen x="1920" y="960" width="1920" height="1080" /> <screen x="0" y="27" width="1920" height="1011" />
</state> </state>
<state width="1897" height="242" key="GridCell.Tab.0.right/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@0.219.1920.1080" timestamp="1584040732589" /> <state width="1897" height="242" key="GridCell.Tab.0.right/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@0.219.1920.1080" timestamp="1584040732589" />
<state width="1897" height="242" key="GridCell.Tab.0.right/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584046025683" /> <state width="1897" height="242" key="GridCell.Tab.0.right/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584046993665" />
<state width="1897" height="242" key="GridCell.Tab.0.right/0.27.1920.1011/1920.0.1920.1080@0.27.1920.1011" timestamp="1581516934990" /> <state width="1897" height="222" key="GridCell.Tab.0.right/0.27.1920.1011/1920.0.1920.1080@0.27.1920.1011" timestamp="1584358257558" />
<state x="2100" y="1057" width="1536" height="901" key="MergeDialog" timestamp="1584041943170"> <state x="2100" y="1057" width="1536" height="901" key="MergeDialog" timestamp="1584041943170">
<screen x="1920" y="960" width="1920" height="1080" /> <screen x="1920" y="960" width="1920" height="1080" />
</state> </state>
@ -255,11 +256,11 @@
<screen x="1920" y="960" width="1920" height="1080" /> <screen x="1920" y="960" width="1920" height="1080" />
</state> </state>
<state x="2585" y="1218" width="580" height="571" key="MultipleFileMergeDialog/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584041950044" /> <state x="2585" y="1218" width="580" height="571" key="MultipleFileMergeDialog/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584041950044" />
<state x="2515" y="1212" width="886" height="578" key="find.popup" timestamp="1584044814605"> <state x="595" y="263" width="886" height="578" key="find.popup" timestamp="1584358232711">
<screen x="1920" y="960" width="1920" height="1080" /> <screen x="0" y="27" width="1920" height="1011" />
</state> </state>
<state x="2515" y="1212" width="886" height="578" key="find.popup/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584044814605" /> <state x="2515" y="1212" width="886" height="578" key="find.popup/0.219.1920.1080/1920.0.1280.960/1920.960.1920.1080@1920.960.1920.1080" timestamp="1584044814605" />
<state x="595" y="263" width="730" height="538" key="find.popup/0.27.1920.1011/1920.0.1920.1080@0.27.1920.1011" timestamp="1581517068558" /> <state x="595" y="263" width="886" height="578" key="find.popup/0.27.1920.1011/1920.0.1920.1080@0.27.1920.1011" timestamp="1584358232711" />
<state x="685" y="364" width="540" height="343" key="vcs.readOnlyHandler.ReadOnlyStatusDialog" timestamp="1581516396481"> <state x="685" y="364" width="540" height="343" key="vcs.readOnlyHandler.ReadOnlyStatusDialog" timestamp="1581516396481">
<screen x="0" y="27" width="1920" height="1011" /> <screen x="0" y="27" width="1920" height="1011" />
</state> </state>

View file

@ -7,6 +7,7 @@
"build": "./node_modules/.bin/ng build --aot --prod", "build": "./node_modules/.bin/ng build --aot --prod",
"test": "./node_modules/.bin/ng test", "test": "./node_modules/.bin/ng test",
"test:headless": "./node_modules/.bin/ng test --browsers=ChromeHeadlessDebug", "test:headless": "./node_modules/.bin/ng test --browsers=ChromeHeadlessDebug",
"test:headless:singleRun": "./node_modules/.bin/ng test --browsers=ChromeHeadlessDebug --watch false",
"lint": "./node_modules/.bin/ng lint", "lint": "./node_modules/.bin/ng lint",
"e2e": "./node_modules/.bin/ng e2e", "e2e": "./node_modules/.bin/ng e2e",
"pack": "./node_modules/.bin/ng-packagr -p ./src/lib/package.json" "pack": "./node_modules/.bin/ng-packagr -p ./src/lib/package.json"