Skip to content

Commit e5ec6d4

Browse files
committed
ci: migrate checking by rflint from TravisCI to GitHub Actions
Part of #1154
1 parent a72f172 commit e5ec6d4

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

.github/workflows/quality-checks.yml

+18
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,21 @@ jobs:
9696
9797
- name: Run bootlint
9898
run: ./src/main/scripts/execute-command.sh bootlint
99+
run-rflint:
100+
name: Run RobotFramework linter
101+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
102+
runs-on: ubuntu-20.04
103+
steps:
104+
- name: Clone source code
105+
uses: actions/[email protected] # https://github.com/actions/checkout
106+
with:
107+
# Whether to configure the token or SSH key with the local git config. Default: true
108+
persist-credentials: false
109+
- name: Install rflint
110+
run: >-
111+
pip3 install \
112+
--user \
113+
robotframework==3.2.2 \
114+
robotframework-lint==1.1
115+
- name: Run rflint
116+
run: ./src/main/scripts/execute-command.sh rflint

.travis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ before_script:
2626
curl https://bootstrap.pypa.io/pip/3.6/get-pip.py | sudo -H python3.6;
2727
pip3 install --user \
2828
html5validator==0.4.2 \
29-
robotframework==3.2.2 \
30-
robotframework-lint==1.1 \
3129
ansible==2.9.2 \
3230
ansible-lint==4.2.0;
3331
if [ "$TRAVIS_PULL_REQUEST" != 'false' ]; then

src/main/scripts/ci/check-build-and-verify.sh

+2-14
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ if [ "${1:-}" = '--only-integration-tests' ]; then
5858
RUN_ONLY_INTEGRATION_TESTS=yes
5959
fi
6060

61-
RFLINT_STATUS=
6261
SHELLCHECK_STATUS=
6362
JEST_STATUS=
6463
HTML_STATUS=
@@ -74,7 +73,6 @@ if [ "${SPRING_PROFILES_ACTIVE:-}" = 'travis' ] && [ "${TRAVIS_PULL_REQUEST:-fal
7473
DANGER_STATUS=
7574
fi
7675

77-
RFLINT_TIME=0
7876
SHELLCHECK_TIME=0
7977
JEST_TIME=0
8078
HTML_TIME=0
@@ -110,7 +108,6 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
110108
AFFECTS_JS_FILES="$(echo "$MODIFIED_FILES" | grep -q '\.js$' || echo 'no')"
111109
AFFECTS_HTML_FILES="$(echo "$MODIFIED_FILES" | grep -q '\.html$' || echo 'no')"
112110
AFFECTS_JAVA_FILES="$(echo "$MODIFIED_FILES" | grep -q '\.java$' || echo 'no')"
113-
AFFECTS_ROBOT_FILES="$(echo "$MODIFIED_FILES" | grep -q '\.robot$' || echo 'no')"
114111
AFFECTS_SHELL_FILES="$(echo "$MODIFIED_FILES" | grep -q '\.sh$' || echo 'no')"
115112
AFFECTS_GROOVY_FILES="$(echo "$MODIFIED_FILES" | grep -q '\.groovy$' || echo 'no')"
116113
AFFECTS_PLAYBOOKS="$(echo "$MODIFIED_FILES" | grep -Eq '(vagrant|prod|deploy|bootstrap|/roles/.+)\.yml$' || echo 'no')"
@@ -134,7 +131,6 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
134131
if [ "$AFFECTS_HTML_FILES" = 'no' ]; then
135132
HTML_STATUS=skip
136133
fi
137-
[ "$AFFECTS_ROBOT_FILES" != 'no' ] || RFLINT_STATUS=skip
138134
[ "$AFFECTS_SHELL_FILES" != 'no' ] || SHELLCHECK_STATUS=skip
139135

140136
if [ "$AFFECTS_PLAYBOOKS" = 'no' ]; then
@@ -154,13 +150,6 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
154150

155151
echo
156152

157-
if [ "$RFLINT_STATUS" != 'skip' ]; then
158-
START_TIME=$SECONDS
159-
"$EXEC_CMD" rflint >rflint.log 2>&1 || RFLINT_STATUS=fail
160-
RFLINT_TIME=$((SECONDS - START_TIME))
161-
fi
162-
print_status "$RFLINT_STATUS" "$RFLINT_TIME" 'Run robot framework lint'
163-
164153
if [ "$SHELLCHECK_STATUS" != 'skip' ]; then
165154
START_TIME=$SECONDS
166155
"$EXEC_CMD" shellcheck >shellcheck.log 2>&1 || SHELLCHECK_STATUS=fail
@@ -234,7 +223,6 @@ fi
234223
print_status "$DANGER_STATUS" "$DANGER_TIME" 'Run danger'
235224

236225
if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
237-
[ "$RFLINT_STATUS" = 'skip' ] || print_log rflint.log 'Run robot framework lint'
238226
[ "$SHELLCHECK_STATUS" = 'skip' ] || print_log shellcheck.log 'Run shellcheck'
239227
[ "$JEST_STATUS" = 'skip' ] || print_log jest.log 'Run JavaScript unit tests'
240228
[ "$HTML_STATUS" = 'skip' ] || print_log validator.log 'Run html5validator'
@@ -251,8 +239,8 @@ if [ "$DANGER_STATUS" != 'skip' ]; then
251239
print_log danger.log 'Run danger'
252240
fi
253241

254-
rm -f rflint.log shellcheck.log jest.log validator.log enforcer.log test.log codenarc.log spotbugs.log verify.log danger.log ansible_lint.log
242+
rm -f shellcheck.log jest.log validator.log enforcer.log test.log codenarc.log spotbugs.log verify.log danger.log ansible_lint.log
255243

256-
if echo "$RFLINT_STATUS$SHELLCHECK_STATUS$JEST_STATUS$HTML_STATUS$ENFORCER_STATUS$TEST_STATUS$CODENARC_STATUS$SPOTBUGS_STATUS$VERIFY_STATUS$DANGER_STATUS$ANSIBLE_LINT_STATUS" | grep -Fqs 'fail'; then
244+
if echo "$SHELLCHECK_STATUS$JEST_STATUS$HTML_STATUS$ENFORCER_STATUS$TEST_STATUS$CODENARC_STATUS$SPOTBUGS_STATUS$VERIFY_STATUS$DANGER_STATUS$ANSIBLE_LINT_STATUS" | grep -Fqs 'fail'; then
257245
exit 1
258246
fi

0 commit comments

Comments
 (0)