2024-04-06 23:13:36 +03:00
name : Test on fedora:latest
2020-07-17 22:27:08 +03:00
on : [ push, pull_request]
jobs :
2024-04-07 23:46:04 +03:00
# Test on fedora:latest with stock distro packages
2020-07-17 22:27:08 +03:00
test :
runs-on : ubuntu-latest
container :
image : fedora:latest
steps :
2024-03-20 12:25:25 +03:00
- name : Install base RPM packages
2020-07-17 22:27:08 +03:00
run : |
# glibc-langpacks-en needed to work around python locale issues
2024-03-20 12:06:02 +03:00
# git-core needed for codecov/codecov-action
2020-07-17 22:27:08 +03:00
dnf install -y \
2024-03-20 12:06:02 +03:00
git-core \
2020-07-17 22:27:08 +03:00
rpm-build \
dnf-plugins-core \
glibc-langpack-en \
2021-05-23 21:45:57 +03:00
python3-pytest python3-pytest-cov
2020-07-17 22:27:08 +03:00
2024-03-20 12:18:55 +03:00
- uses : actions/checkout@v4
2024-03-20 12:25:25 +03:00
- name : Install RPM build deps
run : |
2024-10-25 15:48:27 +03:00
dnf install -y \
gettext \
python3-devel \
python3-docutils \
meson
2020-07-17 22:27:08 +03:00
- name : Build RPM and test install
run : |
2024-10-25 15:48:27 +03:00
git config --global --add safe.directory $PWD
meson setup build \
-Dupdate-icon-cache=false \
-Dcompile-schemas=false \
-Dtests=disabled
meson dist -C build
rpmbuild -tb build/meson-dist/virt-manager*.tar.xz
2021-05-23 21:45:57 +03:00
dnf install -y \
2024-10-25 15:48:27 +03:00
~/rpmbuild/RPMS/noarch/virt-install*.rpm \
~/rpmbuild/RPMS/noarch/virt-manager-common*.rpm
2020-07-17 22:27:08 +03:00
- name : Run test suite and generate coverage report
run : |
pytest --cov --cov-report=xml
- name : Upload coverage to Codecov
2024-02-16 09:25:30 +03:00
uses : codecov/codecov-action@v4
2020-07-17 22:27:08 +03:00
with :
2024-02-25 23:57:25 +03:00
token : ${{ secrets.CODECOV_TOKEN }}