Skip to content

Commit

Permalink
remove script
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Apr 18, 2024
1 parent 9848cf2 commit 26273fd
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/test-python-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ on:
type: string
required: false
default: "./codecov.yml"
coverage-target:
description: "The minimum code coverage to be tested."
type: number
required: false
default: 90
secrets:
CODECOV_TOKEN:
description: "The token used to gain access to Codecov."
Expand Down Expand Up @@ -125,25 +120,3 @@ jobs:
codecov_yml_path: ${{ inputs.codecov-yml-path }}
working-directory: ${{ inputs.working-directory }}
file: ${{ env.COVERAGE_REPORT }}

- name: ☂️ Check Code Coverage
working-directory: ${{ inputs.working-directory }}
run: |
python -c <<-EOF "
import math
import xml.etree.ElementTree as ET
root = ET.parse('${{ env.COVERAGE_REPORT }}').getroot()
assert root.tag == 'coverage', 'Expected the \"coverage\" tag to be the root tag.'
coverage = math.floor(
(
(100 / int(root.attrib['lines-valid']))
* int(root.attrib['lines-covered'])
) * 100
) / 100.0
assert (
coverage >= ${{ inputs.coverage-target }}
), f'Coverage of {coverage}% is below the target of ${{ inputs.coverage-target }}%.'
"
EOF

0 comments on commit 26273fd

Please sign in to comment.