diff options
-rw-r--r-- | .gitlab-ci.yml | 7 | ||||
-rw-r--r-- | README.md | 14 | ||||
-rw-r--r-- | docker-compose.yml | 8 |
3 files changed, 29 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3210b35..5f8dca5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,8 @@ default: - gitlab-org-docker .test: + variables: + GITALY_CONNECTION_INFO: '{"address":"tcp://gitaly:8075", "storage":"default"}' before_script: # Set up the environment to run integration tests (still written in Ruby) - apt-get update -qq && apt-get install -y ruby ruby-dev @@ -42,6 +44,11 @@ default: - cp config.yml.example config.yml - go version - which go + services: + - name: registry.gitlab.com/gitlab-org/build/cng/gitaly:latest + # Disable the hooks so we don't have to stub the GitLab API + command: ["bash", "-c", "mkdir -p /home/git/repositories && rm -rf /srv/gitlab-shell/hooks/* && exec /usr/bin/env GITALY_TESTING_NO_GIT_HOOKS=1 /scripts/process-wrapper"] + alias: gitaly script: - make verify test @@ -60,6 +60,20 @@ Run both test and verify (the default Makefile target): bundle install make validate +### Gitaly + +Some tests need a Gitaly server. The +[`docker-compose.yml`](./docker-compose.yml) file will run Gitaly on +port 8075. To tell the tests where Gitaly is, set +`GITALY_CONNECTION_INFO`: + + export GITALY_CONNECTION_INFO='{"address": "tcp://localhost:8075", "storage": "default"}' + make test + +If no `GITALY_CONNECTION_INFO` is set, the test suite will still run, but any +tests requiring Gitaly will be skipped. They will always run in the CI +environment. + ## Git LFS remark Starting with GitLab 8.12, GitLab supports Git LFS authentication through SSH. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..28ab3cf --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: '3.1' +services: + gitaly: + environment: + - GITALY_TESTING_NO_GIT_HOOKS=1 + image: registry.gitlab.com/gitlab-org/build/cng/gitaly:latest + ports: + - '8075:8075' |