Skip to content

Commit

Permalink
[TESTS] Fix for #49 by adding new test-unit for regressions (- WIP #49
Browse files Browse the repository at this point in the history
…-)

Changes in file .coveragerc:
 partial_branches =

Changes in file .github/workflows/Tests.yml:
 jobs:
  • Loading branch information
reactive-firewall committed Aug 22, 2024
1 parent eac6b1b commit e665b7f
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sigterm = True

[report]
include = multicast*,tests*
ignore_errors = True
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
Expand Down Expand Up @@ -51,5 +52,4 @@ partial_branches =
if 'os.path' not in sys.modules:
if 'argparse' not in sys.modules:

ignore_errors = True

101 changes: 81 additions & 20 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
env:
LANG: "en_US.UTF-8"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Pre-Clean
Expand All @@ -44,7 +44,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, 3.11]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
lang-var: ["de.utf-8", "jp.utf-8"]
experimental: [true]
include:
Expand All @@ -63,16 +63,19 @@ jobs:
- python-version: 3.9
lang-var: "en_US.utf-8"
experimental: false
- python-version: "3.10"
lang-var: "en_US.utf-8"
experimental: false
- python-version: "3.11"
lang-var: "en_US.utf-8"
experimental: false
env:
PYTHON_VERSION: ${{ matrix.python-version }}
LANG: ${{ matrix.lang-var }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup dependencies
Expand Down Expand Up @@ -128,9 +131,9 @@ jobs:
PYTHON_VERSION: ${{ matrix.python-version }}
LANG: "en_US.utf-8"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies for ${{ matrix.python-version }}
Expand Down Expand Up @@ -175,9 +178,9 @@ jobs:
CODECLIMATE_REPO_TOKEN: ${{ secrets.CODECLIMATE_TOKEN }}
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies for python ${{ matrix.python-version }} on ${{ matrix.os }}
Expand Down Expand Up @@ -219,7 +222,7 @@ jobs:
verbose: true
fail_ci_if_error: false
- name: Upload Python ${{ matrix.python-version }} Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Test-Report-${{ matrix.os }}-${{ matrix.python-version }}
path: ./test-reports/
Expand Down Expand Up @@ -251,9 +254,9 @@ jobs:
LANG: "en_US.utf-8"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies for python Linters
Expand All @@ -275,10 +278,69 @@ jobs:
run: make -j1 -f Makefile clean || true ;
if: ${{ always() }}

REGRESSION:
if: ${{ success() }}
needs: [MATS, COVERAGE]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
env:
OS: ${{ matrix.os }}
PYTHON_VERSION: ${{ matrix.python-version }}
LANG: "en_US.utf-8"
LC_CTYPE: "en_US.utf-8"
COVERAGE_RCFILE: ./.coveragerc
COV_CORE_SOURCE: ./
COV_CORE_CONFIG: ./.coveragerc
COV_CORE_DATAFILE: .coverage
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies for python ${{ matrix.python-version }} on ${{ matrix.os }}
run: |
pip install --upgrade pip setuptools wheel
pip install -r ./requirements.txt ;
pip install coverage ;
pip install pytest ;
pip install pytest-cov ;
- name: Pre-Clean
id: clean-prep
run: make -j1 -f Makefile clean ;
- name: Pre-build for Python ${{ matrix.python-version }} on ${{ matrix.os }}
run: make -j1 -f Makefile build ;
if: ${{ success() }}
- name: Pre-install for Python ${{ matrix.python-version }} on ${{ matrix.os }}
run: make -j1 -f Makefile user-install || true ;
if: ${{ success() }}
- name: regression check for Coverage for py${{ matrix.python-version }} on ${{ matrix.os }}
run: |
./tests/check_codecov_regression || false ;
cp -vf ./coverage.xml ./test-reports/coverage.xml || true ;
shell: bash
- name: Summerize MATs for python ${{ matrix.python-version }}
id: sumerize-r-check
run: |
echo "- Test Reports did NOT regress for python version ${{ matrix.python-version }}" >> $GITHUB_STEP_SUMMARY
if: ${{ success() }}
shell: bash
- name: Post-z-purge
id: post-uninstall
run: make -j1 -f Makefile purge || true ;
if: ${{ always() }}
- name: Post-Clean
id: post-zz-end
run: make -j1 -f Makefile clean || true ;
if: ${{ always() }}

INTEGRATION:
if: ${{ success() }}
needs: [MATS, COVERAGE]
needs: [MATS, COVERAGE, REGRESSION]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
Expand All @@ -297,9 +359,9 @@ jobs:
CODECLIMATE_REPO_TOKEN: ${{ secrets.CODECLIMATE_TOKEN }}
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies for python ${{ matrix.python-version }} on ${{ matrix.os }}
Expand Down Expand Up @@ -346,7 +408,7 @@ jobs:
verbose: true
fail_ci_if_error: false
- name: Upload Extra Python ${{ matrix.python-version }} Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Integration-Test-Report-${{ matrix.os }}-${{ matrix.python-version }}
path: ./test-reports/
Expand All @@ -364,10 +426,9 @@ jobs:
run: make -j1 -f Makefile clean || true ;
if: ${{ always() }}


TOX:
if: ${{ success() }}
needs: [MATS, STYLE, COVERAGE, INTEGRATION]
needs: [MATS, STYLE, COVERAGE, REGRESSION, INTEGRATION]
runs-on: ubuntu-latest
timeout-minutes: 30

Expand All @@ -376,9 +437,9 @@ jobs:
LANG: 'en_US.utf-8'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies for Tox
Expand Down

0 comments on commit e665b7f

Please sign in to comment.