Skip to content

Commit

Permalink
uncomment tests in test.yml
Browse files Browse the repository at this point in the history
fix indenting test.yml

fix some formatting

more edits for flake8 linter

some more  linter issues

fix line 79 linter issue

fix line 79 linter issue 2

fix line 79 linter issue 3

fix line 79 linter issue 4

fix line 79 linter issue 5

fix line 79 linter issue 6

fix line 79 linter issue 7

fix line 79 linter issue 8

fix line 79 linter issue 9

fix line 79 linter issue 10

install diff-cover test.yml

add diff-cover test.yml

remove m flag diff-cover test.yml
  • Loading branch information
kimpham54 committed Nov 15, 2024
1 parent 05c433d commit 9bfc71d
Show file tree
Hide file tree
Showing 5 changed files with 235 additions and 101 deletions.
48 changes: 25 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
# - name: Run flake8
# run: |
# pip install flake8
# # stop the build if there are flake8 errors
# flake8 . --count --show-source --statistics
- name: Run flake8
run: |
pip install flake8
# stop the build if there are flake8 errors
flake8 . --count --show-source --statistics
- name: Run unit tests
run: |
Expand All @@ -47,21 +47,23 @@ jobs:
python -m coverage combine
python -m coverage report -m --skip-covered
python -m coverage xml
# # Fetch base branch for comparison (e.g., main)
# - name: Fetch base branch
# run: git fetch origin main

# # Compare coverage with the base branch
# - name: Compare coverage
# run: |
# git checkout main
# python -m coverage run -p -m pytest src/jp2_remediator/tests/unit
# python -m coverage xml -o coverage-base.xml
# git checkout -
# python -m diff-cover --compare-branch=main coverage.xml

# # Fail if coverage decreases
# - name: Fail if coverage decreases
# run: python -m diff-cover --compare-branch=main coverage.xml --fail-under=100
# Fetch base branch for comparison (e.g., main)
- name: Fetch base branch
run: git fetch origin main

# Compare coverage with the base branch
- name: Compare coverage
run: |
pip install diff-cover
git checkout main
python -m coverage run -p -m pytest src/jp2_remediator/tests/unit
python -m coverage xml -o coverage-base.xml
git checkout -
python diff-cover --compare-branch=main coverage.xml
# Fail if coverage decreases
- name: Fail if coverage decreases
run: |
python diff-cover --compare-branch=main coverage.xml --fail-under=100
Loading

0 comments on commit 9bfc71d

Please sign in to comment.