Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contrib provider ce-oem GitHub workflow (Infra) #938

Merged
merged 11 commits into from
Jan 24, 2024
47 changes: 47 additions & 0 deletions .github/workflows/tox-contrib-provider-ce-oem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Test provider-ce-oem (from contrib area) with tox

on:
push:
branches: [ main ]
paths:
- contrib/checkbox-provider-ce-oem/**
pull_request:
branches: [ main ]
paths:
- contrib/checkbox-provider-ce-oem/**
workflow_dispatch:

jobs:
tox_test_contrib_ce_oem_provider:
name: Test ce-oem provider (from contrib area) with tox
defaults:
run:
working-directory: contrib/checkbox-provider-ce-oem
runs-on: ubuntu-20.04
strategy:
matrix:
python: ["3.5", "3.6", "3.8", "3.10"]
include:
- python: "3.5"
tox_env_name: "py35"
- python: "3.6"
tox_env_name: "py36"
- python: "3.8"
tox_env_name: "py38"
- python: "3.10"
tox_env_name: "py310"
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install tox
run: pip install tox
- name: Run tox
run: tox -e${{ matrix.tox_env_name }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: contrib-provider-ce-oem
11 changes: 11 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,14 @@ flag_management:
# carryforward means if a test was not run again, use the previous
# coverage result for the current flag (part)
carryforward: true
individual_flags:
# non-blocking status check for ce-oem provider in contrib area
- name: contrib-provider-ce-oem
paths:
- contrib/checkbox-provider-ce-oem
carryforward: true
statuses:
- type: patch
informational: true
- type: project
informational: true
35 changes: 0 additions & 35 deletions contrib/.github/workflows/tox.yaml

This file was deleted.

17 changes: 17 additions & 0 deletions contrib/checkbox-provider-ce-oem/.coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[run]
branch = True
source = bin,manage
omit =
tests/*

[report]
exclude_lines =
@abc.abstractmethod
@abc.abstractproperty
@abstractmethod
@abstractproperty
@public
pragma: no cover
raise NotImplementedError
if __name__ == .__main__.:
show_missing = True
32 changes: 19 additions & 13 deletions contrib/checkbox-provider-ce-oem/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,29 @@ skipsdist=True
[testenv]
allowlist_externals = rm
commands =
pip -q install ../../checkbox-ng
{envpython} -m pip -q install ../../checkbox-ng
# Required because this provider depends on checkbox-support parsers & scripts
pip -q install ../../checkbox-support
{envpython} -m pip -q install ../../checkbox-support
rm -f /var/tmp/checkbox-providers-develop/checkbox-provider-resource.provider
rm -f /var/tmp/checkbox-providers-develop/checkbox-provider-base.provider
rm -f /var/tmp/checkbox-providers-develop/checkbox-provider-certification-client.provider
rm -f /var/tmp/checkbox-providers-develop/checkbox-provider-certification-server.provider
rm -f /var/tmp/checkbox-providers-develop/checkbox-provider-ce-oem.provider
# Install all providers in develop mode to make sure everything works fine
{envbindir}/python3 ../resource/manage.py develop
{envbindir}/python3 ../base/manage.py develop
{envbindir}/python3 ../certification-client/manage.py develop
{envbindir}/python3 ../certification-server/manage.py develop
{envbindir}/python3 manage.py develop
{envbindir}/python3 manage.py validate
{envbindir}/python3 manage.py test
{envpython} ../../providers/resource/manage.py develop
{envpython} ../../providers/base/manage.py develop
{envpython} ../../providers/certification-client/manage.py develop
{envpython} ../../providers/certification-server/manage.py develop
{envpython} manage.py develop
{envpython} manage.py validate
{envpython} -m coverage run manage.py test
{envpython} -m coverage report
{envpython} -m coverage xml

[testenv:py3.5]
[testenv:py35]
deps =
flake8
coverage == 5.5
pyserial
natsort == 4.0.3
requests == 2.9.1
Expand All @@ -42,9 +45,10 @@ setenv=
# but it breaks some old python3.5 builds
SETUPTOOLS_SCM_PRETEND_VERSION=0.0

[testenv:py3.6]
[testenv:py36]
deps =
flake8
coverage == 5.5
pyserial
natsort == 4.0.3
requests == 2.18.4
Expand All @@ -57,9 +61,10 @@ deps =
distro == 1.0.1
PyYAML == 3.12

[testenv:py3.8]
[testenv:py38]
deps =
flake8
coverage == 7.3.0
pep8-naming
pyserial
natsort == 7.0.1
Expand All @@ -73,9 +78,10 @@ deps =
distro == 1.4.0
PyYAML == 5.3.1

[testenv:py3.10]
[testenv:py310]
deps =
flake8
coverage == 7.3.0
pep8-naming
pyserial
natsort == 8.0.2
Expand Down
Loading