-
Notifications
You must be signed in to change notification settings - Fork 78
35 lines (33 loc) · 1.09 KB
/
test.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
name: CI
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: static checks
run: |
sudo apt update
sudo apt build-dep -y ./
sudo apt install -y python3-pytest
pytest-3
# ensure running each test standalone works
for f in test/test_*.py; do
if [ "$(basename $f)" = "test_base.py" ]; then
continue
fi
pytest-3 $f
done
- name: setup
run: |
sudo apt-get update
sudo apt-get install distro-info autopkgtest git-buildpackage
sudo snap refresh lxd --channel=4.0/stable
sudo usermod --append --groups lxd $(whoami)
sudo lxd init --auto
sudo autopkgtest-build-lxd ubuntu:$(distro-info --stable)
- name: build source
run: gbp buildpackage -us -uc -S -d -nc --git-ignore-branch --git-prebuild=
- name: autopkgtest
# skipping tests is ok
run: sudo autopkgtest -U ../build-area/*.dsc -- lxd autopkgtest/ubuntu/$(distro-info --stable)/amd64 || [ $? == 2 ]