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

Add github automated unit testing and linting. #354

Merged

Conversation

brownts
Copy link
Collaborator

@brownts brownts commented May 3, 2022

Adds CI for GitHub-based unit testing (as described in #347), as well as for linting.

Note, currently the lint job fails because there are violations in the code base. These should likely be cleaned in the near future to avoid lint job failures going forward.

@GitMensch
Copy link
Collaborator

There's no reason to not pull this. Feel free to commit things like this (or the fix for it) directly :-)

Not sure if we can do something about the errors in the test setup?

[1670:0503/125747.120609:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

[1670:0503/125747.134172:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

[1670:0503/125748.789396:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

[1670:0503/125748.791142:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

[1670:0503/125748.903138:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

[1670:0503/125748.904863:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

[1670:0503/125749.079064:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

[1670:0503/125749.081379:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

Additional "linting" issue not noted here #322.

@GitMensch GitMensch merged commit 4939e7f into WebFreak001:master May 3, 2022
@GitMensch GitMensch mentioned this pull request May 3, 2022
2 tasks
@GitMensch
Copy link
Collaborator

Our commits possibly met a "race condition", please adjust the new file HACKING.md concerning the unit tests and its CI a bit.
Thanks.

@GitMensch
Copy link
Collaborator

While the linting was "copied over" and now fixed I see that tslint is deprecated and officially suggest to move to eslint.

Is there any reason to not follow the https://code.visualstudio.com/api/advanced-topics/tslint-eslint-migration for the repo (dev dependency change/addition, rule conversion (nearly automated), CI configuration)?

@brownts
Copy link
Collaborator Author

brownts commented May 5, 2022

Yes, that is correct, tslint has been deprecated for a couple years at this point. I was planning to take a look at updating it to use the newer eslint functionality. I hadn't looked into the automated conversion...that might be handy. I think it would also be good to add some configuration to help identify deprecated APIs, which the current tslint configuration is not currently setup to identify. Also, the current 'tslint.json' has a number of "recommended" rules disabled. It would be good to get closer to the "recommended" set, with fewer exceptions.

@brownts
Copy link
Collaborator Author

brownts commented May 6, 2022

I updated this now to use ESLint. This will also check for deprecated APIs too. I fixed the remaining deprecated API references in the code base and also a few more lint warnings that ESLint was picking up.

@GitMensch
Copy link
Collaborator

Thanks for abf41e4 d6ce83c and db00740! I guess we can now add a single entry for "internal code cleanup using linting and CI-assisted checks", or similar to the ChangeLog :-)

Can I kindly ask you for inspecting the now existing HACKING.md and adjust the notes about testing and linting? Apart from a single changelog entry (as always a user will only see if we broke something) this is the missing part for this "area" to have it finished.

@GitMensch GitMensch added this to the v0.26.1 milestone May 6, 2022
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