|
|
@@ -18,12 +18,30 @@ env: |
|
|
- TEST_SUITE="examples --skip-install"
|
|
|
|
|
|
install:
|
|
|
- # PPA for plainbox.
|
|
|
- - sudo apt-add-repository -y ppa:hardware-certification/public
|
|
|
+ - sudo apt-add-repository -y ppa:ubuntu-lxc/lxd-stable
|
|
|
- sudo apt-get update -qq
|
|
|
- - sudo apt-get install -qq build-essential squashfs-tools dpkg-dev plainbox pyflakes python3-apt python3-docopt python3-coverage python3-fixtures python3-jsonschema python3-mccabe python3-pep8 python3-requests python3-testscenarios python3-testtools python3-yaml python3-lxml
|
|
|
+ - sudo apt-get -o Dpkg::Options::="--force-confnew" -y dist-upgrade
|
|
|
+ - sudo apt-get install -qq lxd lxcfs
|
|
|
+ # newgrp will ask for a password. Use usermod and sudo -E instead, as
|
|
|
+ # explained in the travis docs:
|
|
|
+ # https://docs.travis-ci.com/user/trusty-ci-environment/#Group-membership
|
|
|
+ - sudo usermod -a -G lxd $USER
|
|
|
+before_script:
|
|
|
+ - sudo -E su $USER -c "lxd-images import ubuntu xenial --stream daily --alias ubuntu"
|
|
|
+ - sudo -E su $USER -c "lxc launch ubuntu xenial"
|
|
|
+ # Wait for the container to get an IP address.
|
|
|
+ - while ! sudo lxc info xenial | grep -q eth0.*IPV4; do sleep 5s; done
|
|
|
+ # Allow the container user to do everything on the repository.
|
|
|
+ - sudo chmod -R 777 $(pwd)
|
|
|
+ # Mount the repository directory in the container.
|
|
|
+ - sudo -E su $USER -c "lxc config device add xenial /dev/sda1 disk source=$(pwd) path=/home/ubuntu"
|
|
|
+ - sudo -E su $USER -c "lxc exec xenial -- apt-get update"
|
|
|
+ - sudo -E su $USER -c "lxc exec xenial -- apt-get install -y build-essential bzr dpkg-dev git mercurial pyflakes python3.4 python3-apt python3-docopt python3-coverage python3-fixtures python3-jsonschema python3-mccabe python3-pep8 python3-pip python3-requests python3-testscenarios python3-testtools python3-yaml python3-lxml squashfs-tools"
|
|
|
script:
|
|
|
- - ./runtests.sh $TEST_SUITE
|
|
|
+ - sudo -E su $USER -c "lxc exec xenial -- su - ubuntu -c 'cd /home/ubuntu; ./runtests.sh $TEST_SUITE'"
|
|
|
after_success:
|
|
|
+ - sudo apt-get install -qq python3-docopt python3-coverage python3-requests
|
|
|
- pip install coveralls
|
|
|
+ - sudo chmod 777 .coverage
|
|
|
+ - sudo chown $USER:$USER .coverage
|
|
|
- COVERALLS_REPO_TOKEN=$COVERALLS_TOKEN coveralls
|
0 comments on commit
eab93d5