dej611 / spid-react-button

Pulsante SSO per SPID in React
https://dej611.github.io/spid-react-button/
European Union Public License 1.2
18 stars 15 forks source link

CI tests check fails for PR from forks #74

Closed dej611 closed 2 years ago

dej611 commented 2 years ago

The test checks fails during the coverage upload process with the following error:

/home/runner/work/spid-react-button/spid-react-button/cc-reporter after-build --exit-code 0
Error: you must supply a CC_TEST_REPORTER_ID ENV variable or pass it via the -r flag
Usage:
  cc-test-reporter after-build [flags]

Flags:
  -s, --batch-size int               batch size for source files (default 500)
  -e, --coverage-endpoint string     endpoint to upload coverage information to (default "api.codeclimate.com/v1/test_reports")
  -t, --coverage-input-type string   type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, lcov-json, simplecov, xccov]
      --exit-code int                exit code of the test run
  -r, --id string                    reporter identifier
      --insecure                     send coverage insecurely (without HTTPS)
  -p, --prefix string                the root directory where the coverage analysis was performed (default "/home/runner/work/spid-react-button/spid-react-button")

Global Flags:
  -d, --debug   run in debug mode

Error: The process '/home/runner/work/spid-react-button/spid-react-button/cc-reporter' failed with exit code 255
(node:2248) UnhandledPromiseRejectionWarning: Error: The process '/home/runner/work/spid-react-button/spid-react-button/cc-reporter' failed with exit code 255
    at ExecState._setResult (/home/runner/work/_actions/paambaati/codeclimate-action/v3.0.0/node_modules/@actions/exec/lib/toolrunner.js:592:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/paambaati/codeclimate-action/v3.0.0/node_modules/@actions/exec/lib/toolrunner.js:575:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/paambaati/codeclimate-action/v3.0.0/node_modules/@actions/exec/lib/toolrunner.js:469:27)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
(node:2248) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:2248) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Error: 🚨 CC Reporter after-build checkin failed!

This is due to environment variables in Github not being exposed to forks due to security concerns: https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow

dej611 commented 2 years ago

Fixed via #75