You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: Detect and Test Submodulesrun: | # Find all directories containing a go.mod file within 'pkg' for module in $(find pkg -name "go.mod" -exec dirname {} \;); do echo "Testing module: $module" cd $module # Extract module name (replace '/' with '_') module_name=$(echo $module | tr '/' '_') # Download dependencies for the submodule go mod download go mod tidy # Run tests for the submodule and generate coverage export APP_ENV=test warning_count=$(go test ./... -v -short -coverprofile=${module_name}.cov -coverpkg=./... | tee /dev/tty | grep -c "WARNING" || true) total_warning_count=$((total_warning_count + warning_count)) # Return to the root directory cd - done echo "Total warnings found: $total_warning_count" echo "total_warning_count=$total_warning_count" >> $GITHUB_ENV
The code is too complicated to be maintained in a YAML file, and it cannot be easily tested without running it via a GHA
The code could be extracted to something like a shell script or equivalent
This idea comes from the discussion that happened here
The text was updated successfully, but these errors were encountered:
The current code of .github/workflows/go.yml contains something like this
The code is too complicated to be maintained in a YAML file, and it cannot be easily tested without running it via a GHA
The code could be extracted to something like a shell script or equivalent
This idea comes from the discussion that happened here
The text was updated successfully, but these errors were encountered: