-
Notifications
You must be signed in to change notification settings - Fork 14
31 lines (29 loc) · 1.04 KB
/
tox.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
name: Lint
on:
- push
- pull_request
jobs:
func:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
set -euxo pipefail
python -m pip install --upgrade pip
pip install tox
sudo snap install --classic juju --channel=2.9/stable
sudo lxd init --auto
# This is a throw-away CI environment, do not do this at home
sudo chmod 666 /var/snap/lxd/common/lxd/unix.socket
# until Juju provides stable IPv6-support we unfortunately need this
lxc network set lxdbr0 ipv6.address none
# iptables updates to allow traffic to/from LXD bridge/external network
sudo iptables -I DOCKER-USER -i lxdbr0 -o eth0 -j ACCEPT
sudo iptables -I DOCKER-USER -o lxdbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
juju bootstrap localhost
- name: Bundle validation with tox using dry-run juju deploy
run: tox -e lint
- name: consider debugging
uses: lhotari/action-upterm@v1
if: failure()