-
Notifications
You must be signed in to change notification settings - Fork 33
50 lines (47 loc) · 1.55 KB
/
ci.yaml
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
43
44
45
46
47
48
49
50
name: Pycloudlib CI
on: [pull_request]
concurrency:
group: "ci-${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
tox-defaults:
runs-on: ubuntu-20.04
steps:
- name: Install dependencies
run: sudo DEBIAN_FRONTEND=noninteractive apt-get -qy install tox
- name: Git checkout
uses: actions/checkout@v3
- name: Run tox
run: tox
docs:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo DEBIAN_FRONTEND=noninteractive apt-get -qy install tox
- name: Git checkout
uses: actions/checkout@v3
- name: Build rtd docs
run: tox -e docs
integration-tests:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update -q
sudo apt-get install -qy distro-info tox
sudo snap install lxd
- name: Initialize LXD
run: |
ssh-keygen -P "" -q -f ~/.ssh/id_rsa
mkdir -p ~/.config
echo "[lxd]" > ~/.config/pycloudlib.toml
sudo adduser $USER lxd
# Jammy GH Action runners have docker installed, which edits iptables
# in a way that is incompatible with lxd.
# https://linuxcontainers.org/lxd/docs/master/howto/network_bridge_firewalld/#prevent-issues-with-lxd-and-docker
sudo iptables -I DOCKER-USER -j ACCEPT
sudo lxd init --auto
- name: Git checkout
uses: actions/checkout@v3
- name: Run CI integration tests
run: sg lxd -c 'tox -e integration-tests-ci'