Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Go
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
to be continuous...
Go
Commits
b06df486
Commit
b06df486
authored
2 years ago
by
Pierre Smeyers
Browse files
Options
Downloads
Patches
Plain Diff
fix(test): shellcheck
parent
0490a6e9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gitlab-ci-golang.yml
+2
-6
2 additions, 6 deletions
templates/gitlab-ci-golang.yml
with
2 additions
and
6 deletions
templates/gitlab-ci-golang.yml
+
2
−
6
View file @
b06df486
...
...
@@ -140,9 +140,6 @@ stages:
local junit_tests_report="reports/junit-tests-report.xml"
local coverage_report_opts=-coverprofile=reports/coverage.out
# maybe produce Sonar test report (not failing)
sonar_tests_report || true
set +e
# shellcheck disable=SC2086
go test $GO_TEST_FLAGS "$coverage_report_opts" $GO_TEST_PACKAGES > "$go_text_report"
...
...
@@ -157,11 +154,10 @@ stages:
# produce JUnit report (for GitLab)
install_go_junit_report
# shellcheck disable=SC2002
cat "$go_text_report" | "$GOBIN/go-junit-report" > "$junit_tests_report"
"$GOBIN/go-junit-report" < "$go_text_report" > "$junit_tests_report"
# produce JSON report (for SonarQube)
cat "$go_text_report" | go tool test2json
> "$go_json_report"
go tool test2json < "$go_text_report"
> "$go_json_report"
# maybe fail
if [[ "$test_rc" != "0" ]]; then exit "$test_rc"; fi
...
...
This diff is collapsed.
Click to expand it.
Ghost User
@ghost
mentioned in commit
b771f636
·
2 years ago
mentioned in commit
b771f636
mentioned in commit b771f63656beeb7d3b48712a64478e312c44d7a6
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment