| 1 | image: golang:alpine |
| 2 | stages: |
| 3 | - test |
| 4 | |
| 5 | variables: |
| 6 | GO_PACKAGE: "howett.net/plist" |
| 7 | |
| 8 | before_script: |
| 9 | - "mkdir -p $(dirname $GOPATH/src/$GO_PACKAGE)" |
| 10 | - "ln -s $(pwd) $GOPATH/src/$GO_PACKAGE" |
| 11 | - "cd $GOPATH/src/$GO_PACKAGE" |
| 12 | |
| 13 | .template:go-test: &template-go-test |
| 14 | stage: test |
| 15 | script: |
| 16 | - go test |
| 17 | |
| 18 | go-test-cover:latest: |
| 19 | stage: test |
| 20 | script: |
| 21 | - go test -v -cover |
| 22 | coverage: '/^coverage: \d+\.\d+/' |
| 23 | |
| 24 | go-test-appengine:latest: |
| 25 | stage: test |
| 26 | script: |
| 27 | - go test -tags appengine |
| 28 | |
| 29 | go-test:1.6: |
| 30 | <<: *template-go-test |
| 31 | image: golang:1.6-alpine |
| 32 | |
| 33 | go-test:1.4: |
| 34 | <<: *template-go-test |
| 35 | image: golang:1.4-alpine |
| 36 | |
| 37 | go-test:1.2: |
| 38 | <<: *template-go-test |
| 39 | image: golang:1.2 |