-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
42 lines (39 loc) · 1.54 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
language: python
dist: bionic
install:
# Required so `git describe` will definitely find a tag; see
# https://github.com/travis-ci/travis-ci/issues/7422
- git fetch --unshallow
matrix:
fast_finish: true
include:
- name: run-lxd-example
install:
# Generate an SSH key to connect to test instances
- ssh-keygen -N "" -f ~/.ssh/id_rsa
- pip install -r requirements.txt
script:
- sudo apt-get remove --yes --purge lxd lxd-client
- sudo rm -Rf /var/lib/lxd
- sudo snap install lxd
- sudo lxd init --auto
- sudo usermod -a -G lxd $USER
- sg lxd -c "PYCLOUDLIB_CONFIG=pycloudlib.toml.template python examples/lxd.py"
- name: run-cloudinit-integration-tests
install:
# Generate an SSH key to connect to test instances
- ssh-keygen -N "" -f ~/.ssh/id_rsa
- pip install -r requirements.txt
- pip install pytest
script:
- sudo apt-get remove --yes --purge lxd lxd-client
- sudo apt-get update -q
- sudo apt-get install -qqy distro-info
- sudo rm -Rf /var/lib/lxd
- sudo snap install lxd
- sudo lxd init --auto
- sudo usermod -a -G lxd $USER
- git clone https://github.com/canonical/cloud-init.git
- cd cloud-init
- pip install -r requirements.txt
- sg lxd -c "PYCLOUDLIB_CONFIG=../pycloudlib.toml.template CLOUD_INIT_CLOUD_INIT_SOURCE=ppa:cloud-init-dev/daily pytest -m ci tests/integration_tests/"