Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(workflow): add cache to workflows using actions/setup-node #1382

Merged
merged 1 commit into from
Oct 13, 2021
Merged

ci(workflow): add cache to workflows using actions/setup-node #1382

merged 1 commit into from
Oct 13, 2021

Conversation

oscard0m
Copy link
Contributor

Description

Add cache to workflows using actions/setup-node

Context

setup-node GitHub Action just released a new option to add cache to steps using it.

You can find the details here: https://github.blog/changelog/2021-07-02-github-actions-setup-node-now-supports-dependency-caching/


🤖 This PR has been generated automatically by this octoherd script, feel free to run it in your GitHub user/org repositories! 💪🏾

@vercel
Copy link

vercel bot commented Oct 12, 2021

@oscard0m is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

@anuraghazra
Copy link
Owner

Hi @oscard0m thanks for the PR, I noticed that this PR is being generated by a script/bot while I really liked the script and it's cool that you worked on that script https://github.com/oscard0m/octoherd-script-add-cache-to-node-github-action

Although In this hacktoberfest season I would encourage not to use this script since it's discouraged by the hacktoberfest team, read more here: https://hacktoberfest.digitalocean.com/resources/qualitystandards

And since you worked on the script yourself I won't make this PR as invalid.

@anuraghazra anuraghazra merged commit 2723f00 into anuraghazra:master Oct 13, 2021
anuraghazra added a commit that referenced this pull request Oct 13, 2021
@anuraghazra
Copy link
Owner

Ahhh well that didn't worked, I should've tested it out first.

https://github.com/anuraghazra/github-readme-stats/runs/3884213603

So it seems since we don't have the lock file it failed, I wonder since previous setup is working but the cache key is always Linux-npm-cache- since hashFiles('**/package-lock.json') isn't finding any file, thus cache was hitting all the time.

So the previous cache setup was buggy. maybe I'll remove the cache entirely.

@oscard0m
Copy link
Contributor Author

Hi @oscard0m thanks for the PR, I noticed that this PR is being generated by a script/bot while I really liked the script and it's cool that you worked on that script https://github.com/oscard0m/octoherd-script-add-cache-to-node-github-action

Although In this hacktoberfest season I would encourage not to use this script since it's discouraged by the hacktoberfest team, read more here: https://hacktoberfest.digitalocean.com/resources/qualitystandards

And since you worked on the script yourself I won't make this PR as invalid.

Thanks for the feedback on this. My understanding is to not automate PR's for whitespaces/typos but this is more than that right? As you pointed, the script is done by myself and I manually review what's being opened as PR. On my understanding this should be valid for hacktoberfest. The idea is to help other projects with this change (I did it in the past before hacktoberfest already), not automate contributions just for comoleting hacktoberfest's challenge (you can see I'm contributing to other OSS projects without the topic this month).

@oscard0m
Copy link
Contributor Author

oscard0m commented Oct 13, 2021

Ahhh well that didn't worked, I should've tested it out first.

https://github.com/anuraghazra/github-readme-stats/runs/3884213603

So it seems since we don't have the lock file it failed, I wonder since previous setup is working but the cache key is always Linux-npm-cache- since hashFiles('**/package-lock.json') isn't finding any file, thus cache was hitting all the time.

So the previous cache setup was buggy. maybe I'll remove the cache entirely.

uops. Sorry to hear that. I think there's a way to use the cache and say the path you want to use. Do you want me to create an issue and we discuss it there? @anuraghazra

anuraghazra added a commit that referenced this pull request Oct 18, 2021
* Fixed word-wrap bug

* ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (#1382)

* Revert "ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (#1382)"

This reverts commit 2723f00.

* chore: remove action cache

* chore: minor change

Co-authored-by: Markus Tyrkkö <[email protected]>
Co-authored-by: Oscar Dominguez <[email protected]>
Co-authored-by: Anurag <[email protected]>
developStorm pushed a commit to developStorm/github-readme-stats that referenced this pull request Dec 4, 2021
* docs: better navigation in readme (anuraghazra#1196)

* docs(cn): replace error picture (anuraghazra#1217)

env name should be PAT_1, but on the picture is GITHUB_TOKEN

* docs: fix grammar (anuraghazra#1242)

* fix: subfolder support for api_domain wakatime api (anuraghazra#1235)

* docs(theme): Auto update theme readme (anuraghazra#1263)

* feat: hide wakatime languages (anuraghazra#1212)

* feat: added option to hide languages

* feat: recalculate percentages for hidden languages

* refactor: reverted langs_count and did some formatting

* doc: added hide to readme

* feat: make languages var mutable and improve filter logic

Co-authored-by: Adrian Kunz <[email protected]>

* refactor: improve code and added tests

Co-authored-by: Adrian Kunz <[email protected]>
Co-authored-by: Anurag <[email protected]>

* fix: text overlap (anuraghazra#1207)

* feat(statCard): added more concise description

* fix: removed isLongLocale param

* Revert "fix: removed isLongLocale param"

This reverts commit 55f1e2d.

* feat: add de and nl to longLocal to fix padding

* chore: grammar error on CONTRIBUTING.md (anuraghazra#1272)

* chore: update funding link (anuraghazra#1289)

* chore: revert total stars naming

* chore: change `total stars` to `total stars earned` (anuraghazra#1293)

* docs: replace '?theme' with '&theme' (anuraghazra#1307)

* style(theme): added aura_dark themes (anuraghazra#1312)

* feat(layout): improve flexLayout & fixed layout overlaps (anuraghazra#1314)

* feat(layout): improve flexLayout & fixed layout overlaps

* chore: fix vercel build

* chore: added under-the-hood blogpost link in contributing.md

* style(theme): added panda theme (anuraghazra#1319)

* refactor: refactor repo card (anuraghazra#1325)

* refactor: refactored repo-card

* test: fix tests

* test: fixed tests

* fix: unprovided description error

* chore: update theme preview bot content (anuraghazra#1326)

* Change default stats card width with hide rank

* Add tests for stats card with card_width

* Add card_width Stats Card description to readme

* docs: match link with section title (anuraghazra#1341)

* Match link with section title

Match the link of Top Languages Card with the title of his section ("Tarjeta de Lenguajes Principales").

* Fix typo

* style(theme): added cobalt2 theme (anuraghazra#1343)

* style(theme): added noctis minimus theme (anuraghazra#1342)

* Add Noctis minimus theme

* Add Noctis minimus theme

Co-authored-by: Anurag Hazra <[email protected]>

* chore: fix grammatical errors in the scripts (anuraghazra#1346)

* Fix grammatical errors

* Fix grammatical errors

* chore: reduce vercel memory & timeout duration (anuraghazra#1366)

* fix: change serverless function memory to 128mb

* chore: change maxDuration

* fix: wakatime card translations (anuraghazra#1363)

* refactor: jsdoc in utils & minor changes (anuraghazra#1377)

* refactor: jsdoc in utils & minor changes

* chore: jsdoc Card class

* chore: jsdoc for getStyles

* ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (anuraghazra#1382)

* Revert "ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (anuraghazra#1382)"

This reverts commit 2723f00.

* chore: remove action cache

* style(theme): add gruvbox_light theme (anuraghazra#1379)

* docs(theme): Auto update theme readme (anuraghazra#1384)

Co-authored-by: Github Readme Stats Bot <[email protected]>

* fix: word-wrap bug (anuraghazra#1378)

* Fixed word-wrap bug

* ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (anuraghazra#1382)

* Revert "ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (anuraghazra#1382)"

This reverts commit 2723f00.

* chore: remove action cache

* chore: minor change

Co-authored-by: Markus Tyrkkö <[email protected]>
Co-authored-by: Oscar Dominguez <[email protected]>
Co-authored-by: Anurag <[email protected]>

* fix: hotfix for graphql api error (anuraghazra#1409)

* docs: add fork instructions (anuraghazra#1418)

* docs: add fork instructions

* chore: revert toc

* fix: add icon width to stats-card min width calculation

* fix: fixes rank circle padding problem

This commit fixes a padding problem that was introduced in
f9c0e0b. In the new code, the padding
around the rank circle will be 50 when the stats card is bigger than
450. When it is smaller than 450 the left and right padding will shrink
equally.

* fix: bug where wakatime api returns undefined languages (anuraghazra#1403)

Co-authored-by: Markus Tyrkkö <[email protected]>

* style(themes): aura theme (anuraghazra#1423)

* style(theme): added swift theme (anuraghazra#1395)

Co-authored-by: Anurag Hazra <[email protected]>

* docs(theme): Auto update theme readme (anuraghazra#1440)

Co-authored-by: Github Readme Stats Bot <[email protected]>

* feat(script): improved theme preview script (anuraghazra#1439)

* feat: improved theme preview script

* chore: add getPRNumber

* feat(theme-preview): added ability to upsert comments (anuraghazra#1442)

* chore: added ability upsert comments

* chore: new event

* chore: update github action trigger

* chore: remove edit event from action

* chore(deps): update axios to 0.24.0 (axios/axios#3410) (anuraghazra#1446)

* style: improve code structure

* fix: fix stats and language tests

* style(theme): add apprentice theme (anuraghazra#1466)

* fix: auth token header (anuraghazra#1474)

* feat(stats): add 'not_bold' option to stats card

* fix: decrease maxduration

Co-authored-by: OldWizard209 <[email protected]>
Co-authored-by: XUQING <[email protected]>
Co-authored-by: 김예환 Ye-Hwan Kim (Sam) <[email protected]>
Co-authored-by: Alexandro Perez <[email protected]>
Co-authored-by: Masahiro Furudate <[email protected]>
Co-authored-by: Julian Holfeld <[email protected]>
Co-authored-by: Adrian Kunz <[email protected]>
Co-authored-by: Anurag <[email protected]>
Co-authored-by: Philip Jake <[email protected]>
Co-authored-by: Moe Bachrouch <[email protected]>
Co-authored-by: Horeb Parraud <[email protected]>
Co-authored-by: Chandrika Deb <[email protected]>
Co-authored-by: Artem Kostiuk <[email protected]>
Co-authored-by: Danix <[email protected]>
Co-authored-by: Red Headphone <[email protected]>
Co-authored-by: Anant Mishra <[email protected]>
Co-authored-by: CleanMachine1 <[email protected]>
Co-authored-by: Julián Sanmartino <[email protected]>
Co-authored-by: Oscar Dominguez <[email protected]>
Co-authored-by: Michael Schnerring <[email protected]>
Co-authored-by: Github Readme Stats Bot <[email protected]>
Co-authored-by: Markus Tyrkkö <[email protected]>
Co-authored-by: Markus Tyrkkö <[email protected]>
Co-authored-by: Tuhana GAYRETLİ <[email protected]>
Co-authored-by: Eduardo Santi <[email protected]>
Co-authored-by: Abhijith N T <[email protected]>
Co-authored-by: Çınar Yılmaz <[email protected]>
developStorm added a commit to developStorm/github-readme-stats that referenced this pull request Dec 4, 2021
* docs: better navigation in readme (anuraghazra#1196)

* docs(cn): replace error picture (anuraghazra#1217)

env name should be PAT_1, but on the picture is GITHUB_TOKEN

* docs: fix grammar (anuraghazra#1242)

* fix: subfolder support for api_domain wakatime api (anuraghazra#1235)

* docs(theme): Auto update theme readme (anuraghazra#1263)

* feat: hide wakatime languages (anuraghazra#1212)

* feat: added option to hide languages

* feat: recalculate percentages for hidden languages

* refactor: reverted langs_count and did some formatting

* doc: added hide to readme

* feat: make languages var mutable and improve filter logic

Co-authored-by: Adrian Kunz <[email protected]>

* refactor: improve code and added tests

Co-authored-by: Adrian Kunz <[email protected]>
Co-authored-by: Anurag <[email protected]>

* fix: text overlap (anuraghazra#1207)

* feat(statCard): added more concise description

* fix: removed isLongLocale param

* Revert "fix: removed isLongLocale param"

This reverts commit 55f1e2d.

* feat: add de and nl to longLocal to fix padding

* chore: grammar error on CONTRIBUTING.md (anuraghazra#1272)

* chore: update funding link (anuraghazra#1289)

* chore: revert total stars naming

* chore: change `total stars` to `total stars earned` (anuraghazra#1293)

* docs: replace '?theme' with '&theme' (anuraghazra#1307)

* style(theme): added aura_dark themes (anuraghazra#1312)

* feat(layout): improve flexLayout & fixed layout overlaps (anuraghazra#1314)

* feat(layout): improve flexLayout & fixed layout overlaps

* chore: fix vercel build

* chore: added under-the-hood blogpost link in contributing.md

* style(theme): added panda theme (anuraghazra#1319)

* refactor: refactor repo card (anuraghazra#1325)

* refactor: refactored repo-card

* test: fix tests

* test: fixed tests

* fix: unprovided description error

* chore: update theme preview bot content (anuraghazra#1326)

* docs: match link with section title (anuraghazra#1341)

* Match link with section title

Match the link of Top Languages Card with the title of his section ("Tarjeta de Lenguajes Principales").

* Fix typo

* style(theme): added cobalt2 theme (anuraghazra#1343)

* style(theme): added noctis minimus theme (anuraghazra#1342)

* Add Noctis minimus theme

* Add Noctis minimus theme

Co-authored-by: Anurag Hazra <[email protected]>

* chore: fix grammatical errors in the scripts (anuraghazra#1346)

* Fix grammatical errors

* Fix grammatical errors

* chore: reduce vercel memory & timeout duration (anuraghazra#1366)

* fix: change serverless function memory to 128mb

* chore: change maxDuration

* fix: wakatime card translations (anuraghazra#1363)

* refactor: jsdoc in utils & minor changes (anuraghazra#1377)

* refactor: jsdoc in utils & minor changes

* chore: jsdoc Card class

* chore: jsdoc for getStyles

* ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (anuraghazra#1382)

* Revert "ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (anuraghazra#1382)"

This reverts commit 2723f00.

* chore: remove action cache

* style(theme): add gruvbox_light theme (anuraghazra#1379)

* docs(theme): Auto update theme readme (anuraghazra#1384)

Co-authored-by: Github Readme Stats Bot <[email protected]>

* fix: word-wrap bug (anuraghazra#1378)

* Fixed word-wrap bug

* ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (anuraghazra#1382)

* Revert "ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (anuraghazra#1382)"

This reverts commit 2723f00.

* chore: remove action cache

* chore: minor change

Co-authored-by: Markus Tyrkkö <[email protected]>
Co-authored-by: Oscar Dominguez <[email protected]>
Co-authored-by: Anurag <[email protected]>

* fix: hotfix for graphql api error (anuraghazra#1409)

* docs: add fork instructions (anuraghazra#1418)

* docs: add fork instructions

* chore: revert toc

* fix: bug where wakatime api returns undefined languages (anuraghazra#1403)

Co-authored-by: Markus Tyrkkö <[email protected]>

* style(themes): aura theme (anuraghazra#1423)

* style(theme): added swift theme (anuraghazra#1395)

Co-authored-by: Anurag Hazra <[email protected]>

* docs(theme): Auto update theme readme (anuraghazra#1440)

Co-authored-by: Github Readme Stats Bot <[email protected]>

* feat(script): improved theme preview script (anuraghazra#1439)

* feat: improved theme preview script

* chore: add getPRNumber

* feat(theme-preview): added ability to upsert comments (anuraghazra#1442)

* chore: added ability upsert comments

* chore: new event

* chore: update github action trigger

* chore: remove edit event from action

* chore(deps): update axios to 0.24.0 (axios/axios#3410) (anuraghazra#1446)

* style(theme): add apprentice theme (anuraghazra#1466)

* fix: auth token header (anuraghazra#1474)

* Include all repo w/ access to

* parameterize affiliation

* Use GraphQL variable syntax

* Custom ownerAffiliations for general stats

* Add default affiliation

* style: improve code structure

Co-authored-by: OldWizard209 <[email protected]>
Co-authored-by: XUQING <[email protected]>
Co-authored-by: 김예환 Ye-Hwan Kim (Sam) <[email protected]>
Co-authored-by: Alexandro Perez <[email protected]>
Co-authored-by: Masahiro Furudate <[email protected]>
Co-authored-by: Julian Holfeld <[email protected]>
Co-authored-by: Adrian Kunz <[email protected]>
Co-authored-by: Anurag <[email protected]>
Co-authored-by: Philip Jake <[email protected]>
Co-authored-by: Moe Bachrouch <[email protected]>
Co-authored-by: Horeb Parraud <[email protected]>
Co-authored-by: Chandrika Deb <[email protected]>
Co-authored-by: Danix <[email protected]>
Co-authored-by: Red Headphone <[email protected]>
Co-authored-by: Anant Mishra <[email protected]>
Co-authored-by: CleanMachine1 <[email protected]>
Co-authored-by: Julián Sanmartino <[email protected]>
Co-authored-by: Oscar Dominguez <[email protected]>
Co-authored-by: Michael Schnerring <[email protected]>
Co-authored-by: Github Readme Stats Bot <[email protected]>
Co-authored-by: Markus Tyrkkö <[email protected]>
Co-authored-by: Markus Tyrkkö <[email protected]>
Co-authored-by: Tuhana GAYRETLİ <[email protected]>
Co-authored-by: Eduardo Santi <[email protected]>
Co-authored-by: Abhijith N T <[email protected]>
Co-authored-by: Çınar Yılmaz <[email protected]>
Co-authored-by: Raymond Nook <[email protected]>
Kab1r pushed a commit to Kab1r/github-readme-stats that referenced this pull request Apr 4, 2022
Kab1r pushed a commit to Kab1r/github-readme-stats that referenced this pull request Apr 4, 2022
Kab1r pushed a commit to Kab1r/github-readme-stats that referenced this pull request Apr 4, 2022
* Fixed word-wrap bug

* ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (anuraghazra#1382)

* Revert "ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (anuraghazra#1382)"

This reverts commit 2723f00.

* chore: remove action cache

* chore: minor change

Co-authored-by: Markus Tyrkkö <[email protected]>
Co-authored-by: Oscar Dominguez <[email protected]>
Co-authored-by: Anurag <[email protected]>
lencx pushed a commit to lencx/github-readme-stats that referenced this pull request May 16, 2022
lencx pushed a commit to lencx/github-readme-stats that referenced this pull request May 16, 2022
lencx pushed a commit to lencx/github-readme-stats that referenced this pull request May 16, 2022
* Fixed word-wrap bug

* ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (anuraghazra#1382)

* Revert "ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (anuraghazra#1382)"

This reverts commit 2723f00.

* chore: remove action cache

* chore: minor change

Co-authored-by: Markus Tyrkkö <[email protected]>
Co-authored-by: Oscar Dominguez <[email protected]>
Co-authored-by: Anurag <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants