-
-
Notifications
You must be signed in to change notification settings - Fork 739
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
chore: Rename 'ci' script conflicting with NPM #350
Conversation
You're right about this, but as probably the only person who types it, I'd prefer to keep it short. I need to think more about this. |
|
Is there a standard name other projects use for this? |
I've seen separate "coverage" jobs/configs in other projects, but I don't think that's all that the extra testing is covering. |
Test and lint are different things. CI is both. Maybe more. I haven't found a name I like better yet. |
Yeah, it was more about seeing - name: Run All Validations
if: ${{ matrix.node-version == '14.x' }}
run: |
npm run test-cover
npm run lint
npm run test-declaration Although if you were going to go that way, I'd probably have a separate coverage and lint jobs, outside the bigger test matrix |
Did a pass at the separate jobs in a separat commit here, but I can rebase it out. |
I like having a single command for CI so that I can run it locally before commit and know I probably won't break CI. The refactoring of jobs here seems to maybe lose the coverage run? I'd definitely prefer that run everywhere as part of Node/OS platform validation. (Though bugs in c8 limit where it can be run.) You are right that running lint everywhere is unnecessary, but it's quick and it's easier in my mind to define "here is the CI script and it runs on the whole matrix". |
674494b
to
d0a86ce
Compare
Right, added that back as an additional job. If you end up using something like Coverall or CodeCov, they have their own GitHub Actions that can be used
I think it's actually reversed right now. It does run across all 3 of the OS's, but only for Node 14. It just calls test on the rest right now |
d0a86ce
to
c4f4e83
Compare
If you go back in history, coverage started out running on all matrix combinations. It was only limited like it is now because bugs in c8 on older Node versions came up. The fact it doesn't run on Node 15 is a bug because the version compare isn't (can't be?) done on version ranges. I prefer the one-CI-script approach over separate jobs because it's simple and easy and covers everything possible. |
c4f4e83
to
e54f85d
Compare
Just switched to coverage back to all versions to see the error. Is this a bug with c8, or is it just flagging that other versions of node take different paths for that new loading? Alternately, it looks like the block it's complaining about could be ignored with an inline directive https://www.npmjs.com/package/c8#ignoring-the-next-n-elements |
c8 bugs, here's an example: bcoe/c8#220 As a bug, the location seems somewhat random and I don't want to put meaningless suppression's in the code every time this comes up. |
1918326
to
c0ca09b
Compare
Sorry, I just can't get away from feeling like "test-ci" is a less accurate name because it suggests this script is a subset of the "test" operations when it isn't because it also does "lint" (and may do other non-test things in the future like code analysis, etc.). |
c0ca09b
to
c7e2b48
Compare
I appreciate your persistence here, but I'm still in a place where I prefer the original approach over the proposed changes. Sorry! |
OK, it's your project |
npm ci
without the run is a first party command, so renaming it to prevent confusion