Skip to content

Commit

Permalink
ci: improve tests_local workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
leahaeusel committed Jan 21, 2025
1 parent d9cb01f commit fc1b4c3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/tests_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
name: tests_local

on:
schedule:
- cron: '0 1 * * *'
pull_request:
push:
branches:
Expand Down Expand Up @@ -40,16 +42,39 @@ jobs:
- name: Codechecks
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
# pylint queens tests --rcfile=.pylintrc --output-format=json:pylint_warnings.json --fail-under 0
echo "::endgroup::"
# echo "::group::Create code quality report..."
# python .gitlab/pipeline_utils/code_quality_creator.py pylint_warnings.json
# pydocstyle --match-dir='^(?!.*test).*$' queens
# 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:
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
Expand Down
2 changes: 1 addition & 1 deletion queens/interfaces/bmfia_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (c) 2024, QUEENS contributors.
#
# This file is part of QUEENS.
# This file is part of KINGS.
#
# QUEENS is free software: you can redistribute it and/or modify it under the terms of the GNU
# Lesser General Public License as published by the Free Software Foundation, either version 3 of
Expand Down

0 comments on commit fc1b4c3

Please sign in to comment.