mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-18 14:47:03 +00:00
gitlab: Export test directory as an artifact
To debug test failures, it can be convenient to explore the contents of the test directories after the test runs, as they contain logs and generated files. This patch configures the GitLab CI to export the repo tree (which includes the test directory) as GitLab CI artifacts, so they can be easily accessed after the tests have completed.
This commit is contained in:
@@ -36,7 +36,15 @@ integration_stable:
|
||||
- docker info
|
||||
- docker build -t chasquid-test -f test/Dockerfile .
|
||||
- docker run chasquid-test env
|
||||
- docker run chasquid-test make test
|
||||
- docker run --name test1 chasquid-test make test
|
||||
after_script:
|
||||
- docker cp test1:/go/src/blitiri.com.ar/go/chasquid docker-out/
|
||||
artifacts:
|
||||
when: always
|
||||
expire_in: 1 hour
|
||||
paths:
|
||||
- docker-out/
|
||||
|
||||
|
||||
# Integration test, using the latest module versions.
|
||||
integration_latest:
|
||||
@@ -48,7 +56,14 @@ integration_latest:
|
||||
- docker info
|
||||
- docker build -t chasquid-test --build-arg GO_GET_ARGS="-u=patch" -f test/Dockerfile .
|
||||
- docker run chasquid-test env
|
||||
- docker run chasquid-test make test
|
||||
- docker run --name test1 chasquid-test make test
|
||||
after_script:
|
||||
- docker cp test1:/go/src/blitiri.com.ar/go/chasquid docker-out/
|
||||
artifacts:
|
||||
when: always
|
||||
expire_in: 1 hour
|
||||
paths:
|
||||
- docker-out/
|
||||
|
||||
# Build docker image, upload to gitlab registry.
|
||||
gitlab:
|
||||
|
||||
Reference in New Issue
Block a user