Skip to content

Commit 3da14ce

Browse files
author
John Milmine
authored
Merge pull request #30 from djrumbold/features/gitlab-ci
NEW: Support for Gitlab CI testing.
2 parents b1c82a1 + 6a191a4 commit 3da14ce

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.gitlab-ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# We're going to build and run a container in order to test the project. Because
2+
# this process will take place in a container itself, we need to use the 'Docker
3+
# in Docker' image, aka 'dind'.
4+
image: gitlab/dind
5+
6+
stages:
7+
- test
8+
9+
# Build the image, run the container. Exposing the web service on port 3000 is
10+
# an arbitrary choice.
11+
before_script:
12+
- docker info
13+
- build_dir=`pwd`
14+
- docker run -dP -p 3000:80 --name=recipe -v $build_dir:/var/www sminnee/silverstripe-lamp
15+
- docker exec recipe composer install
16+
- docker exec recipe /bin/bash framework/sake /dev/build
17+
18+
# Run the unit tests by invoking the Makefile within the running container.
19+
test:
20+
stage: test
21+
script:
22+
- docker exec recipe make test

0 commit comments

Comments
 (0)