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

Adding yaml as a dep in prepare-node-test-matrix-action #28

Merged
merged 2 commits into from
Nov 15, 2021
Merged

Conversation

dominykas
Copy link
Member

@dominykas dominykas commented Nov 12, 2021

I'll need this in #29 - Github Actions needs all dependencies in the repo, so the node_modules changes are cluttering the actual code changes.

Also fixing the test script to properly exit.

@@ -5,7 +5,7 @@
"description": "Github Actions tooling for testing Node.js packages",
"scripts": {
"lint": "[ \"$NODE_LTS_LATEST\" != \"\" ] && [ \"$MATRIX_NODE_VERSION\" != \"$NODE_LTS_LATEST\" ] && echo 'Skipping linting' || npx -- eslint .github",
"test": "for PRIVATE_ACTION in .github/actions/*/; do cd ${INIT_CWD}/${PRIVATE_ACTION} && npm test; done && cd ${INIT_CWD} && npm run lint"
"test": "for PRIVATE_ACTION in .github/actions/*/; do cd ${INIT_CWD}/${PRIVATE_ACTION} && npm test || exit 1; done && cd ${INIT_CWD} && npm run lint"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed? npm test will exit nonzero, as will cd, if either fails, which should fail the overarching for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not fail the overarching for 🤷‍♂️

Possibly due the semicolon before done? Not sure if doing && done would work 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, no, you're right, i guess that's how it works.

any reason not to use npm workspaces, or lerna?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly because I think going forward I'll want to extract at least the matrix generator into a separate repo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems like a stronger argument for using a workspaces tool, because then each subpackage has its own package.json. Your call tho.

Copy link
Member Author

@dominykas dominykas Nov 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They do have their own package.json even now.

But good point - I might revisit after #6 is implemented (need npm 8 on node 12 to achieve that).

Thanks for the review.

@dominykas dominykas merged commit e9066b2 into main Nov 15, 2021
@dominykas dominykas deleted the npmi branch November 15, 2021 21:53
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