go-ceph/.travis.yml

36 lines
975 B
YAML
Raw Normal View History

sudo: required
2018-12-10 22:17:39 +00:00
language: go
dist: trusty
services:
- docker
branches:
except:
- gh-pages
matrix:
include:
- env: CEPH_VERSION=luminous
- env: CEPH_VERSION=mimic
before_install: |
if [[ "${CEPH_VERSION}" == "luminous" ]]; then
docker build --build-arg CEPH_REPO_URL=https://download.ceph.com/debian-luminous/ -t ceph-golang-ci .
elif [[ "${CEPH_VERSION}" == "mimic" ]]; then
docker build --build-arg CEPH_REPO_URL=https://download.ceph.com/debian-mimic/ -t ceph-golang-ci .
else
echo "unsupported ceph version"
exit 1
fi
2018-12-10 22:17:39 +00:00
before_script:
- go get golang.org/x/lint/golint
# cephfs (fuse) requires: --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined
script:
- docker run --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined --rm -it -v ${PWD}:/go/src/github.com/ceph/go-ceph:z ceph-golang-ci
2018-12-10 22:17:39 +00:00
# run golint and other style checks
- go get golang.org/x/lint/golint
- make check