mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-26 22:56:15 +01:00
GHA: Move test coverage to a separate step
This commit is contained in:
parent
0377766f8e
commit
6946455e55
13
.github/workflows/unittests.yaml
vendored
13
.github/workflows/unittests.yaml
vendored
@ -50,8 +50,7 @@ jobs:
|
|||||||
zypper --non-interactive --gpg-auto-import-keys refresh
|
zypper --non-interactive --gpg-auto-import-keys refresh
|
||||||
zypper --non-interactive dist-upgrade
|
zypper --non-interactive dist-upgrade
|
||||||
zypper --non-interactive install git-lfs
|
zypper --non-interactive install git-lfs
|
||||||
zypper --non-interactive install python3-pytest-cov
|
zypper --non-interactive install diffstat diffutils python3 python3-chardet python3-M2Crypto python3-pip python3-pytest python3-rpm python3-setuptools
|
||||||
zypper --non-interactive install diffstat diffutils python3 python3-chardet python3-M2Crypto python3-pip python3-rpm python3-setuptools
|
|
||||||
|
|
||||||
- name: 'Install packages (Fedora/CentOS)'
|
- name: 'Install packages (Fedora/CentOS)'
|
||||||
if: ${{ startsWith(matrix.container, 'fedora:') || contains(matrix.container, 'centos:') }}
|
if: ${{ startsWith(matrix.container, 'fedora:') || contains(matrix.container, 'centos:') }}
|
||||||
@ -59,7 +58,7 @@ jobs:
|
|||||||
dnf -y makecache
|
dnf -y makecache
|
||||||
dnf -y distro-sync
|
dnf -y distro-sync
|
||||||
dnf -y install git-lfs
|
dnf -y install git-lfs
|
||||||
dnf -y install diffstat diffutils python3 python3-chardet python3-m2crypto python3-pip python3-rpm python3-setuptools
|
dnf -y install diffstat diffutils python3 python3-chardet python3-m2crypto python3-pip python3-pytest python3-rpm python3-setuptools
|
||||||
|
|
||||||
- name: 'Install packages (Debian/Ubuntu)'
|
- name: 'Install packages (Debian/Ubuntu)'
|
||||||
if: ${{ startsWith(matrix.container, 'debian:') || startsWith(matrix.container, 'ubuntu:') }}
|
if: ${{ startsWith(matrix.container, 'debian:') || startsWith(matrix.container, 'ubuntu:') }}
|
||||||
@ -67,7 +66,7 @@ jobs:
|
|||||||
apt-get -y update
|
apt-get -y update
|
||||||
apt-get -y upgrade
|
apt-get -y upgrade
|
||||||
apt-get -y --no-install-recommends install git-lfs
|
apt-get -y --no-install-recommends install git-lfs
|
||||||
apt-get -y --no-install-recommends install diffstat diffutils python3 python3-chardet python3-m2crypto python3-pip python3-rpm python3-setuptools
|
apt-get -y --no-install-recommends install diffstat diffutils python3 python3-chardet python3-m2crypto python3-pip python3-pytest python3-rpm python3-setuptools
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
@ -76,6 +75,12 @@ jobs:
|
|||||||
pip3 install -e .
|
pip3 install -e .
|
||||||
python3 setup.py test
|
python3 setup.py test
|
||||||
|
|
||||||
|
- name: 'Generate coverage reports (OpenSUSE Tumbleweed)'
|
||||||
|
if: ${{ matrix.container == 'opensuse/tumbleweed' }}
|
||||||
|
run: |
|
||||||
|
zypper --non-interactive install python3-pytest python3-pytest-cov
|
||||||
|
pytest --cov=osc
|
||||||
|
|
||||||
- name: 'Upload coverage reports to Codecov (OpenSUSE Tumbleweed)'
|
- name: 'Upload coverage reports to Codecov (OpenSUSE Tumbleweed)'
|
||||||
if: ${{ matrix.container == 'opensuse/tumbleweed' }}
|
if: ${{ matrix.container == 'opensuse/tumbleweed' }}
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
|
@ -3,7 +3,6 @@ setup_requires =
|
|||||||
pytest-runner
|
pytest-runner
|
||||||
tests_require =
|
tests_require =
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
|
||||||
|
|
||||||
[aliases]
|
[aliases]
|
||||||
test=pytest
|
test=pytest
|
||||||
@ -11,6 +10,3 @@ test=pytest
|
|||||||
[flake8]
|
[flake8]
|
||||||
exclude = .git,__pycache__
|
exclude = .git,__pycache__
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
|
|
||||||
[tool:pytest]
|
|
||||||
addopts = --cov=osc
|
|
||||||
|
Loading…
Reference in New Issue
Block a user