anmol098 / waka-readme-stats

This GitHub action helps to add cool dev metrics to your github profile Readme
MIT License
3.36k stars 550 forks source link

BUG Action Passes, no readme stats (not in PATH env variable) #108

Closed JCalaunan closed 4 years ago

JCalaunan commented 4 years ago

Describe the bug Action runs with no failure notifications. No readme stats added to my readme.me See code below.

To Reproduce

  1. Added readme.md with:
    <!--START_SECTION:waka-->
    <!--END_SECTION:waka-->
  2. Setup Wakatime account, get API key
  3. Create Github API key, enable repo and user
  4. Github secrets:
    WAKATIME_API_KEY=
    GH_TOKEN=

See my yml

name: Waka Readme

on:
  workflow_dispatch:
  schedule:
    # Runs at 00:00AM UTC
    - cron: '0 0 * * *'

jobs:
  update-readme:
    name: Update Readme with Metrics
    runs-on: ubuntu-latest
    steps:
      - uses: anmol098/waka-readme-stats@master
        with:
          WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
          GH_TOKEN: ${{ secrets.GH_TOKEN }}
          SHOW_PROJECTS: "False"
          SHOW_LINES_OF_CODE: "True"
          LOCALE: "en"

Expected behavior Output same as in https://github.com/anmol098/waka-readme-stats

Github repository link If applicable, please share the Github repository link. https://github.com/JCalaunan/JCalaunan

Additional context 1: Set up 2: Build 3: Run anmol098/waka-readme-stats@master


Run anmol098/waka-readme-stats@master
  with:
    WAKATIME_API_KEY: ***
    GH_TOKEN: ***
    SHOW_PROJECTS: False
    SHOW_LINES_OF_CODE: True
    LOCALE: en
    SHOW_OS: True
    SHOW_EDITORS: True
    SHOW_TIMEZONE: True
    SHOW_COMMIT: True
    SHOW_LANGUAGE: True
    SHOW_LANGUAGE_PER_REPO: True
    SHOW_LOC_CHART: True
    SHOW_DAYS_OF_WEEK: True
    SHOW_PROFILE_VIEWS: True
    SHOW_SHORT_INFO: True
/usr/bin/docker run --name aac2aa4bdc954c070144e8ad12b99a5d7e9a16_07679f --label aac2aa --workdir /github/workspace --rm -e INPUT_WAKATIME_API_KEY -e INPUT_GH_TOKEN -e INPUT_SHOW_PROJECTS -e INPUT_SHOW_LINES_OF_CODE -e INPUT_LOCALE -e INPUT_SHOW_OS -e INPUT_SHOW_EDITORS -e INPUT_SHOW_TIMEZONE -e INPUT_SHOW_COMMIT -e INPUT_SHOW_LANGUAGE -e INPUT_SHOW_LANGUAGE_PER_REPO -e INPUT_SHOW_LOC_CHART -e INPUT_SHOW_DAYS_OF_WEEK -e INPUT_SHOW_PROFILE_VIEWS -e INPUT_SHOW_SHORT_INFO -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/JCalaunan/JCalaunan":"/github/workspace" aac2aa:4bdc954c070144e8ad12b99a5d7e9a16
(not in PATH env variable)
internal/modules/cjs/loader.js:968
  throw err;
  ^

Error: Cannot find module './read'
Require stack:
- /home/node/.npm-global/lib/node_modules/vega-lite/bin/vl2vg
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/home/node/.npm-global/lib/node_modules/vega-lite/bin/vl2vg:8:14)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/node/.npm-global/lib/node_modules/vega-lite/bin/vl2vg' ]
}
Traceback (most recent call last):
JCalaunan
Query failed to run by returning code of 202. /repos/JCalaunan/JCalaunan/stats/code_frequency,... {}
Exception Occurred Command '['/home/node/.npm-global/bin/vl2vg']' returned non-zero exit status 1.
  File "/main.py", line 504, in <module>
    waka_stats = get_stats(g)
  File "/main.py", line 462, in get_stats
    loc.calculateLoc()
  File "/loc.py", line 33, in calculateLoc
    graph_file = graph.build_graph()
  File "/make_bar_graph.py", line 106, in build_graph
    chart.save('bar_graph.png')
  File "/usr/local/lib/python3.8/site-packages/altair/vegalite/v4/api.py", line 476, in save
    result = save(**kwds)
  File "/usr/local/lib/python3.8/site-packages/altair/utils/save.py", line 112, in save
    mimebundle = spec_to_mimebundle(
  File "/usr/local/lib/python3.8/site-packages/altair/utils/mimebundle.py", line 60, in spec_to_mimebundle
    return altair_saver.render(spec, format, mode=mode, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/altair_saver/_core.py", line 257, in render
    mimebundle.update(saver.mimebundle(fmt))
  File "/usr/local/lib/python3.8/site-packages/altair_saver/savers/_saver.py", line 90, in mimebundle
    bundle[mimetype] = self._serialize(fmt, "mimebundle")
  File "/usr/local/lib/python3.8/site-packages/altair_saver/savers/_node.py", line 114, in _serialize
    spec = self._vl2vg(spec)
  File "/usr/local/lib/python3.8/site-packages/altair_saver/savers/_node.py", line 65, in _vl2vg
    vg_json = check_output_with_stderr(
  File "/usr/local/lib/python3.8/site-packages/altair_saver/_utils.py", line 198, in check_output_with_stderr
    ps = subprocess.run(
  File "/usr/local/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/node/.npm-global/bin/vl2vg']' returned non-zero exit status 1.

4:Cleaning up orphan processes

itsnebulalol commented 4 years ago

Bump; this happens to me too

anmol098 commented 4 years ago

Yes we are aware of this... Working in this... Please don't use LOC chart after that you can be able to use the library

JCalaunan commented 4 years ago

Awesome got it working. Please let us know when Loc is usable. Cheers man!