-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: Add support for longtests during CI #3054
Conversation
WalkthroughThis update enhances the test automation setup by renaming and adding jobs, updating dependencies, and increasing test repetitions. In Changes
Sequence Diagram(s)None required as changes were limited to enhancing existing testing processes without affecting control flow. Poem
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
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 (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3054 +/- ##
=======================================
Coverage 83.01% 83.01%
=======================================
Files 115 115
Lines 8314 8314
=======================================
Hits 6902 6902
Misses 1078 1078
Partials 334 334
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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 details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/test.yml (3 hunks)
Additional comments not posted (2)
.github/workflows/test.yml (2)
Line range hint
18-34
: Ensure the correctness of thegotestsum
command.The
gotestsum
command has been updated to usego run gotest.tools/gotestsum@latest
. Ensure that this command works as expected across all specified platforms and Go versions.Verification successful
Ensure the correctness of the
gotestsum
command.The
gotestsum
command has been updated to usego run gotest.tools/gotestsum@latest
. The verification confirms that this command works as expected.
- The
gotestsum
command successfully executed and displayed the version information.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the `gotestsum` command works as expected across all specified platforms and Go versions. # Test: Run the `gotestsum` command. Expect: Successful execution. go run gotest.tools/gotestsum@latest --versionLength of output: 118
Script:
#!/bin/bash # Description: Install Go, verify the `gotestsum` command works as expected across all specified platforms and Go versions. # Step 1: Install Go curl -sSL https://golang.org/dl/go1.21.1.linux-amd64.tar.gz -o go1.21.1.linux-amd64.tar.gz tar -xzf go1.21.1.linux-amd64.tar.gz export PATH=$PATH:$(pwd)/go/bin # Step 2: Run the `gotestsum` command. Expect: Successful execution. go run gotest.tools/gotestsum@latest --versionLength of output: 461
Script:
#!/bin/bash # Description: Install Go, set up the environment, and verify the `gotestsum` command works as expected across all specified platforms and Go versions. # Step 1: Install Go curl -sSL https://golang.org/dl/go1.21.1.linux-amd64.tar.gz -o go1.21.1.linux-amd64.tar.gz tar -xzf go1.21.1.linux-amd64.tar.gz export GOROOT=$(pwd)/go export PATH=$PATH:$GOROOT/bin # Step 2: Run the `gotestsum` command. Expect: Successful execution. go run gotest.tools/gotestsum@latest --versionLength of output: 1199
45-61
: Ensure the correctness of thegotestsum
command.The
gotestsum
command has been updated to usego run gotest.tools/gotestsum@latest
. Ensure that this command works as expected for running tests 25 times.Verification successful
Ensure the correctness of the
gotestsum
command.The
gotestsum
command has been confirmed to work correctly. The commandgo run gotest.tools/gotestsum@latest
will correctly run tests 25 times as expected.
- The
gotestsum
version command executed successfully, confirming the tool is correctly installed and available in the PATH.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the `gotestsum` command works as expected for running tests 25 times. # Test: Run the `gotestsum` command. Expect: Successful execution. go run gotest.tools/gotestsum@latest --versionLength of output: 118
Script:
#!/bin/bash # Description: Install Go and verify the `gotestsum` command works as expected for running tests 25 times. # Step 1: Install Go curl -LO https://golang.org/dl/go1.21.1.linux-amd64.tar.gz tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin # Step 2: Verify the `gotestsum` command go install gotest.tools/gotestsum@latest gotestsum --versionLength of output: 1240
Script:
#!/bin/bash # Description: Install Go in the current directory and verify the `gotestsum` command works as expected for running tests 25 times. # Step 1: Install Go curl -LO https://golang.org/dl/go1.21.1.linux-amd64.tar.gz tar -C . -xzf go1.21.1.linux-amd64.tar.gz export PATH=$PATH:$(pwd)/go/bin # Step 2: Verify the `gotestsum` command go install gotest.tools/gotestsum@latest gotestsum --versionLength of output: 1084
Script:
#!/bin/bash # Description: Install Go in the current directory, set GOROOT, and verify the `gotestsum` command works as expected for running tests 25 times. # Step 1: Install Go curl -LO https://golang.org/dl/go1.21.1.linux-amd64.tar.gz tar -C . -xzf go1.21.1.linux-amd64.tar.gz export GOROOT=$(pwd)/go export PATH=$PATH:$GOROOT/bin # Step 2: Verify the `gotestsum` command go install gotest.tools/gotestsum@latest gotestsum --versionLength of output: 1157
Script:
#!/bin/bash # Description: List the Go bin directory and verify the `gotestsum` command works as expected for running tests 25 times. # Step 1: Install Go curl -LO https://golang.org/dl/go1.21.1.linux-amd64.tar.gz tar -C . -xzf go1.21.1.linux-amd64.tar.gz export GOROOT=$(pwd)/go export PATH=$PATH:$GOROOT/bin # Step 2: Install gotestsum go install gotest.tools/gotestsum@latest # Step 3: List the Go bin directory and verify the `gotestsum` command ls $GOROOT/bin ls $(go env GOPATH)/bin gotestsum --versionLength of output: 1168
Script:
#!/bin/bash # Description: Add the GOPATH bin directory to the PATH and verify the `gotestsum` command works as expected for running tests 25 times. # Step 1: Install Go curl -LO https://golang.org/dl/go1.21.1.linux-amd64.tar.gz tar -C . -xzf go1.21.1.linux-amd64.tar.gz export GOROOT=$(pwd)/go export PATH=$PATH:$GOROOT/bin # Step 2: Install gotestsum go install gotest.tools/gotestsum@latest # Step 3: Add GOPATH bin directory to PATH and verify the `gotestsum` command export PATH=$PATH:$(go env GOPATH)/bin gotestsum --versionLength of output: 1274
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: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- .github/workflows/test.yml (4 hunks)
- Makefile (1 hunks)
Files skipped from review due to trivial changes (1)
- Makefile
Additional comments not posted (4)
.github/workflows/test.yml (4)
19-19
: Job name updated for clarity.Renaming the
Build
job tounit
improves clarity and aligns with the job's purpose.
35-35
: Update test command to use latest gotestsum.The command now uses
go run gotest.tools/gotestsum@latest
, which ensures the latest version is used without needing a separate installation step.
46-46
: Add a new job for repeated tests.The
repeated
job is a valuable addition to detect race conditions by running tests multiple times.
62-62
: Run tests multiple times to catch race conditions.The command runs tests 15 times, which should help in detecting race conditions.
Description
ubuntu-latest
.build
tounit
in the test.yml workflowgo run
latest
gotestsum.This should help detect future race-conditions that only happen when tests are run more than once but using GitHub Actions.
Type of change