Closed LRR1993 closed 2 years ago
failing job run
to produce code coverage (i understand this isnt supproted yet)
Action version:
OS, where your action is running (windows, linux): node version 12.x
node version 14.x
node version 16.x
Hello @LRR1993,
Thank you for reporting the bug. This issue will be queued for fix.
Having the same issue. I can share a repo with reproduction steps, if needed
Hello @adamwardecki,
Thank you for taking the initiative, but I've encountered this issue many times before - it's related to the optional chaining operator (?), which only appeared in node 14.0 (MDN). This issue requires only few small tweaks to build configuration.
?
Describe a bug
failing job run
Expected behavior
to produce code coverage (i understand this isnt supproted yet)
Details
Action version:
OS, where your action is running (windows, linux): node version 12.x
action.yml file
```yml name: CI on: push: branches: [main] pull_request: branches: [main] jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: [12.x, 14.x, 16.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} cache: 'npm' - run: npm ci - run: npm run lint - run: npm run prettier:check - run: npm run test:ci - uses: actions/upload-artifact@v2 with: name: my-artifact path: coverage/ - uses: artiomtr/jest-coverage-report-action@v2.0-rc.5 with: github-token: ${{ secrets.GITHUB_TOKEN }} skip-step: all coverage-file: coverage/coverage-final.json ```Screenshots
`Run artiomtr/jest-coverage-report-action@v2.0-rc.5 with: github-token: *** skip-step: all coverage-file: coverage/coverage-final.json test-script: npx jest icons: emoji annotations: all package-manager: npm Run $GITHUB_ACTION_PATH/run.sh $GITHUB_ACTION_PATH/run.sh shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} env: INPUT_GITHUB-TOKEN: *** INPUT_TEST-SCRIPT: npx jest INPUT_THRESHOLD: INPUT_WORKING-DIRECTORY: INPUT_ICONS: emoji INPUT_ANNOTATIONS: all INPUT_PACKAGE-MANAGER: npm INPUT_SKIP-STEP: all INPUT_CUSTOM-TITLE: INPUT_COVERAGE-FILE: coverage/coverage-final.json INPUT_BASE-COVERAGE-FILE: Running using node v12.22.6 /home/runner/work/_actions/artiomtr/jest-coverage-report-action/v2.0-rc.5/dist/index.js:2 `,f.message,f.stack);var d=new Error("tunneling socket could not be established, cause="+f.message);d.code="ECONNRESET",t.request.emit("error",d),n.removeSocket(i)}};Pe.prototype.removeSocket=function(t){var r=this.sockets.indexOf(t);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(i){n.request.onSocket(i)})}};function ca(e,t){var r=this;Pe.prototype.createSocket.call(r,e,function(n){var i=e.request.getHeader("host"),s=Pi({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):e.host}),o=hw.connect(0,s);r.sockets[r.sockets.indexOf(n)]=o,t(o)})}function la(e,t,r){return typeof e=="string"?{host:e,port:t,localAddress:r}:e}function Pi(e){for(var t=1,r=arguments.length;t{var Y0=cn(),Z0=kl(),X0=fr();function Q0(e,t,r){for(var n=-1,i=t.length,s={};++n{function eO(e,t){return e!=null&&t in Object(e)}jl.exports=eO});var Ul=c((JL,Il)=>{var tO=Ot(),rO=xt(),nO="[object Arguments]";function iO(e){return rO(e)&&tO(e)==nO}Il.exports=iO});var mn=c((KL,$l)=>{var Ml=Ul(),sO=xt(),Nl=Object.prototype,oO=Nl.hasOwnProperty,aO=Nl.propertyIsEnumerable,uO=Ml(function(){return arguments}())?Ml:function(e){return sO(e)&&oO.call(e,"callee")&&!aO.call(e,"callee")};$l.exports=uO});var hn=c((YL,Bl)=>{var cO=9007199254740991;function lO(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cO}Bl.exports=lO});var ms=c((ZL,Hl)=>{var pO=fr(),fO=mn(),dO=we(),mO=dn(),hO=hn(),gO=Ft();function yO(e,t,r){t=pO(t,e);for(var n=-1,i=t.length,s=!1;++n{var vO=Ll(),_O=ms();function wO(e,t){return e!=null&&_O(e,t,vO)}zl.exports=wO});var Vl=c((QL,Wl)=>{var bO=Gl(),TO=hs();function EO(e,t){return bO(e,t,function(r,n){return TO(e,n)})}Wl.exports=EO});var gs=c((eI,Jl)=>{function SO(e,t){for(var r=-1,n=t.length,i=e.length;++r{var Kl=St(),OO=mn(),xO=we(),Yl=Kl?Kl.isConcatSpreadable:void 0;function PO(e){return xO(e)||OO(e)||!!(Yl&&e&&e[Yl])}Zl.exports=PO});var tp=c((rI,ep)=>{var AO=gs(),CO=Xl();function Ql(e,t,r,n,i){var s=-1,o=e.length;for(r||(r=CO),i||(i=[]);++s0&&r(a)?t>1?Ql(a,t-1,r,n,i):AO(i,a):n||(i[i.length]=a)}return i}ep.exports=Ql});var np=c((nI,rp)=>{var qO=tp();function FO(e){var t=e==null?0:e.length;return t?qO(e,1):[]}rp.exports=FO});var sp=c((iI,ip)=>{function RO(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}ip.exports=RO});var up=c((sI,ap)=>{var kO=sp(),op=Math.max;function DO(e,t,r){return t=op(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=op(n.length-t,0),o=Array(s);++i {function GO(e){return function(){return e}}cp.exports=GO});var ys=c((aI,pp)=>{function jO(e){return e}pp.exports=jO});var mp=c((uI,dp)=>{var LO=lp(),fp=ds(),IO=ys(),UO=fp?function(e,t){return fp(e,"toString",{configurable:!0,enumerable:!1,value:LO(t),writable:!0})}:IO;dp.exports=UO});var gp=c((cI,hp)=>{var MO=800,NO=16,$O=Date.now;function BO(e){var t=0,r=0;return function(){var n=$O(),i=NO-(n-r);if(r=n,i>0){if(++t>=MO)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}hp.exports=BO});var vp=c((lI,yp)=>{var HO=mp(),zO=gp(),WO=zO(HO);yp.exports=WO});var wp=c((pI,_p)=>{var VO=np(),JO=up(),KO=vp();function YO(e){return KO(JO(e,void 0,VO),e+"")}_p.exports=YO});var Tp=c((fI,bp)=>{var ZO=Vl(),XO=wp(),QO=XO(function(e,t){return e==null?{}:ZO(e,t)});bp.exports=QO});var Fp=c((FI,qp)=>{"use strict";var Re="",ws;qp.exports=nx;function nx(e,t){if(typeof e!="string")throw new TypeError("expected a string");if(t===1)return e;if(t===2)return e+e;var r=e.length*t;if(ws!==e||typeof ws=="undefined")ws=e,Re="";else if(Re.length>=r)return Re.substr(0,r);for(;r>Re.length&&t>1;)t&1&&(Re+=e),t>>=1,e+=e;return Re+=e,Re=Re.substr(0,r),Re}});var Ts=c((RI,Gp)=>{"use strict";var Dt=Fp();Gp.exports=lx;var ix=/ +$/,rt=" ",sx=` SyntaxError: Unexpected token '?' at wrapSafe (internal/modules/cjs/loader.js:915:16) at Module._compile (internal/modules/cjs/loader.js:963:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) at internal/main/run_main_module.js:17:47`Additional context
node version 14.x
node version 16.x