Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
golang
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Model registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pipelines
images
test
golang
Commits
638d1422
Commit
638d1422
authored
1 year ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Clean up post-move, add a README
parent
48fad5b2
No related branches found
No related tags found
No related merge requests found
Pipeline
#57018
passed
1 year ago
Stage: build
Stage: release
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
Dockerfile
+2
-4
2 additions, 4 deletions
Dockerfile
README.md
+19
-0
19 additions, 0 deletions
README.md
ci.yml
+1
-1
1 addition, 1 deletion
ci.yml
with
23 additions
and
6 deletions
.gitlab-ci.yml
+
1
−
1
View file @
638d1422
include
:
"
https://git.autistici.org/
ai3/build-
container/raw/master/common.yml"
include
:
"
https://git.autistici.org/
pipelines/
container
s
/raw/master/common.yml"
This diff is collapsed.
Click to expand it.
Dockerfile
+
2
−
4
View file @
638d1422
FROM
golang:1.20
FROM
golang:1.20
WORKDIR
/tmp
WORKDIR
/tmp
COPY
run-go-test /usr/bin/run-go-test
COPY
--chmod=0755
run-go-test /usr/bin/run-go-test
RUN
go
install
github.com/boumenot/gocover-cobertura@latest
;
\
RUN
go
install
github.com/boumenot/gocover-cobertura@latest
;
\
go
install
github.com/jstemmer/go-junit-report@latest
;
\
go
install
github.com/jstemmer/go-junit-report@latest
chmod
0755 /usr/bin/run-go-test
This diff is collapsed.
Click to expand it.
README.md
0 → 100644
+
19
−
0
View file @
638d1422
Golang test container image
===
This repository builds a container image suitable for running Go
tests. Some useful features:
*
generate Gitlab-compatible test and coverage report artifacts
*
properly aggregate coverage data for a whole project (across all its
sub-packages)
To use, include
*ci.yml*
from your project's
*.gitlab-ci.yml*
. Some
useful variables that can be defined:
*
`GO_TEST_PACKAGES`
- Debian packages to install before running the
tests
*
`GO_TEST_GENERATE`
- Set to a non-empty value to run "go generate
./..." before running the tests
*
`GO_TEST_ARGS`
- Additional arguments for "go test" (tags, etc)
This diff is collapsed.
Click to expand it.
ci.yml
+
1
−
1
View file @
638d1422
go_test
:
go_test
:
stage
:
test
stage
:
test
image
:
registry.git.autistici.org/
ai3/docker
/test/golang:master
image
:
registry.git.autistici.org/
pipelines/images
/test/golang:master
script
:
script
:
-
if [ -n "$GO_TEST_PACKAGES" ]; then apt-get -q update; env DEBIAN_FRONTEND=noninteractive apt-get -qy install --no-install-recommends $GO_TEST_PACKAGES; fi
-
if [ -n "$GO_TEST_PACKAGES" ]; then apt-get -q update; env DEBIAN_FRONTEND=noninteractive apt-get -qy install --no-install-recommends $GO_TEST_PACKAGES; fi
-
if [ -n "$GO_TEST_GENERATE" ]; then go generate ./... ; fi
-
if [ -n "$GO_TEST_GENERATE" ]; then go generate ./... ; fi
...
...
This diff is collapsed.
Click to expand it.
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