Skip to content

Commit

Permalink
[QMI-096] Still an issue with the artifacts namings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri Ervasti committed Aug 12, 2024
1 parent 4f922dd commit fb0d7d1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/reusable-ci-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,37 @@ jobs:
- name: Run pylint
run: |
pylint --score=yes --load-plugins=pylint.extensions.mccabe --max-complexity=$COMPLEXITY_MAX_SCORE $SOURCE_DIRS | tee pylint.log
PYLINT_SCORE=$(tail -n 2 pylint.log | grep -o '[0-9]\{1,2\}\.[0-9]\{2\}' | head -n 1)
pylint --score=yes --load-plugins=pylint.extensions.mccabe --max-complexity=$COMPLEXITY_MAX_SCORE $SOURCE_DIRS | tee pylint-${{ matrix.python-version }}.log
PYLINT_SCORE=$(tail -n 2 pylint-${{ matrix.python-version }}.log | grep -o '[0-9]\{1,2\}\.[0-9]\{2\}' | head -n 1)
echo "Pylint score: $PYLINT_SCORE"
exit $(echo "$PYLINT_SCORE < $PYLINT_MIN_SCORE" | bc)
- name: Upload pylint results
uses: actions/upload-artifact@v4
with:
name: pylint-results-${{ matrix.python-version }}
path: pylint.log
path: pylint-${{ matrix.python-version }}.log

- name: Run mypy
run: |
mypy --namespace-packages $SOURCE_DIRS | tee mypy.log
if [ -n "$(tail -n 1 mypy.log | grep -e '^Succes')" ]; then RESULT="pass"; else RESULT="fail"; fi
mypy --namespace-packages $SOURCE_DIRS | tee mypy-${{ matrix.python-version }}.log
if [ -n "$(tail -n 1 mypy-${{ matrix.python-version }}.log | grep -e '^Succes')" ]; then RESULT="pass"; else RESULT="fail"; fi
echo "Mypy result: $RESULT"
exit $([[ "$RESULT" == "pass" ]] && echo 0 || echo 1)
- name: Upload mypy results
uses: actions/upload-artifact@v4
with:
name: mypy-results-${{ matrix.python-version }}
path: mypy.log
path: mypy-${{ matrix.python-version }}.log

- name: Run coverage
run: |
coverage run --branch --source=$SOURCE_DIRS -m unittest discover --start-directory=tests --pattern="test_*.py"
coverage report --show-missing --fail-under=$COVERAGE_MIN_PERC | tee coverage.log
COVERAGE_PERC=$(grep "TOTAL" coverage.log | grep -Eo '[0-9.]+%' | sed 's/%//')
coverage report --show-missing --fail-under=$COVERAGE_MIN_PERC | tee coverage-${{ matrix.python-version }}.log
COVERAGE_PERC=$(grep "TOTAL" coverage-${{ matrix.python-version }}.log | grep -Eo '[0-9.]+%' | sed 's/%//')
echo "Coverage: $COVERAGE_PERC%"
exit $(echo "$COVERAGE_PERC < $COVERAGE_MIN_PERC" | bc)
- name: Upload coverage results
uses: actions/upload-artifact@v4
with:
name: coverage-results-${{ matrix.python-version }}
path: coverage.log
path: coverage-${{ matrix.python-version }}.log

0 comments on commit fb0d7d1

Please sign in to comment.