forked from virt-manager/virt-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.02 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
# Setup latest Fedora with latest libvirt from virt-preview, build
# the RPM, verify it installs, run test suite, upload coverage
test:
runs-on: ubuntu-latest
container:
image: fedora:latest
steps:
- uses: actions/checkout@v2
- name: Install RPM build deps
run: |
# glibc-langpacks-en needed to work around python locale issues
dnf install -y \
rpm-build \
dnf-plugins-core \
glibc-langpack-en \
python3-pytest python3-pytest-cov
dnf builddep -y ./virt-manager.spec
- name: Build RPM and test install
run: |
./setup.py rpm
dnf install -y \
noarch/virt-install*.rpm \
noarch/virt-manager-common*.rpm
- name: Run test suite and generate coverage report
run: |
pytest --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests