-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: improve tests_local workflow (#103)
* ci: improve tests_local workflow * ci: switch license checking framework * ci: Switch from pydocstyle to ruff to check docstrings * ci: change name of coverage report artifact
- Loading branch information
1 parent
45f6f37
commit 088d977
Showing
27 changed files
with
158 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
name: tests_local | ||
|
||
on: | ||
schedule: | ||
- cron: '0 1 * * *' | ||
pull_request: | ||
push: | ||
branches: | ||
|
@@ -37,19 +39,50 @@ jobs: | |
uses: ./.github/actions/create_python_environment | ||
- name: Get Python package manager | ||
run: echo "PYTHON_PACKAGE_MANAGER=${{steps.environment.outputs.ppm}}" >> $GITHUB_ENV | ||
- name: Codechecks | ||
- name: Code checks | ||
run: | | ||
$PYTHON_PACKAGE_MANAGER activate queens | ||
isort --check-only queens tests > track_isort.txt 2>&1 | ||
black --check queens tests > track_black.txt 2>&1 | ||
pylint --rcfile=.pylintrc_ci queens tests | tee track_pylint.txt 2>&1 | ||
pylint queens tests --rcfile=.pylintrc --output-format=json:pylint_warnings.json --fail-under 0 | ||
python .gitlab/pipeline_utils/code_quality_creator.py pylint_warnings.json | ||
pydocstyle --match-dir='^(?!.*test).*$' queens > track_pydocstyle.txt 2>&1 | ||
echo "::group::Run isort..." | ||
isort --check-only queens tests | ||
echo "::endgroup::" | ||
echo "::group::Run black..." | ||
black --check queens tests | ||
echo "::endgroup::" | ||
echo "::group::Run pylint..." | ||
pylint --rcfile=.pylintrc_ci queens tests | ||
echo "::endgroup::" | ||
echo "::group::Run ruff..." | ||
ruff check | ||
echo "::endgroup::" | ||
# echo "::group::Create code quality report..." | ||
# pylint queens tests --rcfile=.pylintrc --output-format=json:pylint_warnings.json --fail-under 0 | ||
# python .gitlab/pipeline_utils/code_quality_creator.py pylint_warnings.json | ||
# echo "::endgroup::" | ||
echo "::group::Check compatibility with licenses of dependencies..." | ||
liccheck -r requirements.txt | ||
echo "::endgroup::" | ||
echo "::group::Create an rc file for the license header check..." | ||
python .gitlab/pipeline_utils/create_licenserc.py --template_file ".gitlab/pipeline_utils/.licenserc_template.yaml" --text_file "license_header.tmpl" --output_file ".licenserc.yaml" --placeholder "license_header" | ||
echo "::endgroup::" | ||
- name: Check License headers | ||
uses: apache/skywalking-eyes/[email protected] | ||
- name: Run pytest | ||
run: | | ||
$PYTHON_PACKAGE_MANAGER activate queens | ||
pytest -v -m "unit_tests or integration_tests or integration_tests_fourc" --cov --cov-report=term --cov-report=html:html_coverage_report --cov-report=xml:xml_coverage_report.xml $TEST_TIMING_OPTION --color=yes -o junit_logging=all --junitxml=test_junit.xml | ||
- name: Upload coverage report | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
name: html-coverage-report | ||
path: html_coverage_report/ | ||
retention-days: 7 | ||
- name: Publish junit pytest report | ||
uses: mikepenz/action-junit-report@v5 | ||
if: success() || failure() # always run even if the previous step fails | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.