-
-
Notifications
You must be signed in to change notification settings - Fork 21
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 unit test job #110
Add unit test job #110
Conversation
WalkthroughThe recent updates introduce a GitHub Actions workflow to automate Go unit tests, enhancing code quality and reliability. Additionally, modifications in the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (2)
- .github/workflows/golangci-test.yml (1 hunks)
- internal/observation/observation.go (2 hunks)
Additional comments not posted (7)
.github/workflows/golangci-test.yml (5)
19-19
: Ensure that themake check-tensorflow
command is documented within the project, including its purpose and any prerequisites. This is important for maintainability and for new contributors to understand the project setup.
22-25
: Setting environment variables for CGO is crucial for projects that depend on C libraries. Verify that the path$HOME/src/tensorflow
is correctly set up in the project's documentation and that it aligns with the TensorFlow installation instructions.
27-27
: Usinggotestfmt
for formatting test output is a good practice for readability. Ensure that the version pinned (@latest
) aligns with the project's dependency management strategy to avoid potential incompatibilities with future updates.
32-32
: The use ofset -euo pipefail
is a good practice for shell scripts to ensure that errors are handled properly. However, ensure that the test commandgo test -json -v ./...
and its piping togotestfmt
are thoroughly tested to handle all possible outcomes, including test failures, without unintended side effects.
40-40
: Usingif-no-files-found: error
is a good practice to ensure that the absence of test logs is treated as an error condition. This helps in identifying issues where tests may not have run as expected.internal/observation/observation.go (2)
101-101
: The formatting of the output line inWriteNotesTable
is clear and follows the expected structure. Ensure that the choice of fixed precision forbeginTime
andendTime
(%.1f
) aligns with the application's requirements for time accuracy.
164-164
: InWriteNotesCsv
, the formatting of the CSV line is consistent and adheres to CSV standards. Similar toWriteNotesTable
, verify that the precision used forbeginTime
andendTime
is appropriate for the application's needs.
Makes use of https://github.com/GoTestTools/gotestfmt to generate readable unit test reports.
866a37e
to
caee7f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (1)
- .github/workflows/golangci-test.yml (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- .github/workflows/golangci-test.yml
Adds a basic unit test workflow job that will run on every pull request. It makes use of gotestfmt to format the console output in a nice way.