diff --git a/.github/workflows/gh-actions.yml b/.github/workflows/gh-actions.yml index 89066f80e..3edfcc651 100644 --- a/.github/workflows/gh-actions.yml +++ b/.github/workflows/gh-actions.yml @@ -17,7 +17,7 @@ jobs: - name: Initializtaion run: sudo apt-get install doxygen vera++ cppcheck pylint pylint python-serial -q - name: Signed-off - run: $RUNNER --check-signed-off=travis + run: $RUNNER --check-signed-off=gh-actions - name: Doxygen run: $RUNNER --check-doxygen - name: Vera++ diff --git a/tools/check-signed-off.sh b/tools/check-signed-off.sh index a4585da33..b402b7d56 100755 --- a/tools/check-signed-off.sh +++ b/tools/check-signed-off.sh @@ -17,7 +17,7 @@ # Usage function print_usage { - echo "Usage: $0 [--help] [--tolerant] [--travis]" + echo "Usage: $0 [--help] [--tolerant] [--gh-actions]" } function print_help @@ -31,7 +31,7 @@ function print_help echo " --tolerant check the existence of the message only but don't" echo " require the name and email address to match the author" echo " of the commit" - echo " --travis perform check in tolerant mode if on Travis CI and not" + echo " --gh-actions perform check in tolerant mode if on GitHub-Actions and not" echo " checking a pull request, perform strict check otherwise" echo "" echo "The last line of every commit message must follow the form of:" @@ -52,16 +52,16 @@ do then TOLERANT="yes" shift - elif [ "$1" == "--travis" ] + elif [ "$1" == "--gh-actions" ] then - if [ "$TRAVIS_PULL_REQUEST" == "" ] + if [ "$GITHUB_EVENT_NAME" == "" ] then - echo -e "\e[1;33mWarning! Travis-tolerant mode requested but not running on Travis CI! \e[0m" - elif [ "$TRAVIS_PULL_REQUEST" == "false" ] + echo -e "\e[1;33mWarning! GitHub-Actions-tolerant mode requested but not running on GitHub-Actions! \e[0m" + elif [ "$GITHUB_EVENT_NAME" == "pull_request" ] then - TOLERANT="yes" - else TOLERANT="no" + else + TOLERANT="yes" fi shift else diff --git a/tools/run-tests.py b/tools/run-tests.py index eb2aeb63c..238318f7f 100755 --- a/tools/run-tests.py +++ b/tools/run-tests.py @@ -174,7 +174,7 @@ def get_arguments(): parser.add_argument('--outdir', metavar='DIR', default=OUTPUT_DIR, help='Specify output directory (default: %(default)s)') parser.add_argument('--check-signed-off', metavar='TYPE', nargs='?', - choices=['strict', 'tolerant', 'travis'], const='strict', + choices=['strict', 'tolerant', 'gh-actions'], const='strict', help='Run signed-off check (%(choices)s; default type if not given: %(const)s)') parser.add_argument('--check-cppcheck', action='store_true', help='Run cppcheck') @@ -472,7 +472,7 @@ Check = collections.namedtuple('Check', ['enabled', 'runner', 'arg']) def main(options): checks = [ Check(options.check_signed_off, run_check, [settings.SIGNED_OFF_SCRIPT] - + {'tolerant': ['--tolerant'], 'travis': ['--travis']}.get(options.check_signed_off, [])), + + {'tolerant': ['--tolerant'], 'gh-actions': ['--gh-actions']}.get(options.check_signed_off, [])), Check(options.check_cppcheck, run_check, [settings.CPPCHECK_SCRIPT]), Check(options.check_doxygen, run_check, [settings.DOXYGEN_SCRIPT]), Check(options.check_pylint, run_check, [settings.PYLINT_SCRIPT]),