#13 Re-enable docs build and tests
Merged a year ago by cverna. Opened a year ago by mattia.
Unknown source docs  into  master

Re-enable docs build and tests
Mattia Verga • a year ago  
file modified
+20 -15
@@ -8,11 +8,11 @@

  # Relax the percentage of code lines that need to be covered by tests a

  # little. For whatever reason, running the tests while building an RPM package

  # often seems to cover fewer LOCs than tests run in the upstream CI pipeline.

- %global cov_fail_under 90

+ %global cov_fail_under 98

  

  Name:           bodhi

  Version:        5.6.1

- Release:        1%{?dist}

+ Release:        3%{?dist}

  #Release:        0.beta.1.%%{commit_short}%%{?dist}

  BuildArch:      noarch

  
@@ -43,6 +43,7 @@

  BuildRequires: %{py3_dist markdown}

  BuildRequires: %{py3_dist psycopg2}

  BuildRequires: %{py3_dist mock}

+ BuildRequires: %{py3_dist prometheus_client}

  BuildRequires: %{py3_dist pylibravatar}

  BuildRequires: %{py3_dist pyramid-fas-openid}

  BuildRequires: %{py3_dist pyramid-mako}
@@ -60,7 +61,7 @@

  BuildRequires: %{py3_dist twisted}

  BuildRequires: %{py3_dist webtest}

  BuildRequires: %{py3_dist webob}

- BuildRequires: %{py3_dist prometheus_client}

+ BuildRequires: %{py3_dist whitenoise}

  BuildRequires: pkgconfig(bash-completion)

  BuildRequires: dnf

  BuildRequires: pungi >= 4.1.20
@@ -209,8 +210,8 @@

  %py3_build

  

  export PYTHONPATH=`pwd`

- #make #{?_smp_mflags} -C docs html

- #make #{?_smp_mflags} -C docs man

+ make %{?_smp_mflags} -C docs html

+ make %{?_smp_mflags} -C docs man

  

  

  %install
@@ -230,16 +231,16 @@

  install -m 640 alembic.ini %{buildroot}%{_sysconfdir}/%{name}/alembic.ini

  install apache/%{name}.wsgi %{buildroot}%{_datadir}/%{name}/%{name}.wsgi

  

- #install -d %%{buildroot}%%{_mandir}/man1

- #install -pm0644 docs/_build/man/*.1 %%{buildroot}%%{_mandir}/man1/

+ install -d %{buildroot}%{_mandir}/man1

+ install -pm0644 docs/_build/man/*.1 %{buildroot}%{_mandir}/man1/

  

  #check

  # The tests need bodhi to be installed to pass. Let's build a venv so we can install bodhi

  # there.

- #{__python3} -m venv --system-site-packages --without-pip .test-venv

+ %{__python3} -m venv --system-site-packages --without-pip .test-venv

  

- #.test-venv/bin/python3 setup.py develop

- #.test-venv/bin/python3 /usr/bin/py.test-3 --cov-fail-under=%%{cov_fail_under} -v bodhi/tests

+ .test-venv/bin/python3 setup.py develop

+ .test-venv/bin/python3 /usr/bin/py.test-3 --cov-fail-under=%{cov_fail_under} -v bodhi/tests

  

  

  %pre server
@@ -253,7 +254,7 @@

  %doc README.rst

  %{bashcomproot}

  %{_bindir}/bodhi

- #{_mandir}/man1/bodhi.1*

+ %{_mandir}/man1/bodhi.1*

  

  

  %files composer
@@ -268,8 +269,7 @@

  

  %files docs

  %license COPYING

- #doc docs/_build/html/ README.rst

- %doc README.rst

+ %doc docs/_build/html/ README.rst

  

  

  %files -n python3-bodhi
@@ -312,8 +312,8 @@

  %dir %{_sysconfdir}/bodhi/

  %{python3_sitelib}/%{name}/server

  %{python3_sitelib}/%{name}_server-%{version}-py%{python3_version}.egg-info

- #{_mandir}/man1/bodhi-*.1*

- #{_mandir}/man1/initialize_bodhi_db.1*

+ %{_mandir}/man1/bodhi-*.1*

+ %{_mandir}/man1/initialize_bodhi_db.1*

  %attr(-,bodhi,root) %{_datadir}/%{name}

  %attr(-,bodhi,bodhi) %config(noreplace) %{_sysconfdir}/bodhi/*

  %attr(0775,bodhi,bodhi) %{_localstatedir}/cache/bodhi
@@ -325,6 +325,11 @@

  

  

  %changelog

+ * Tue Dec 29 2020 Mattia Verga <mattia.verga@protonmail.com> - 5.6.1-3

+ - Re-enable docs build

+ - Re-enable tests

+ - Increase required test coverage to 98.

+ 

  * Mon Nov 30 2020 Clément Verna <cverna@fedoraproject.org> - 5.6.1-1

  - Update to 5.6.1

    https://github.com/fedora-infra/bodhi/releases/tag/5.6.1

Issues with Sphinx in Rawhide have been resolved and we can now re-enable docs build in Rawhide.

We may also want to re-enable tests and raise required coverage.

Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=58531793

Pull-Request has been merged by cverna

a year ago