Skip to content

Commit a72f172

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

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

.github/workflows/quality-checks.yml

+20
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,23 @@ jobs:
7676
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies
7777
- name: Check pom.xml
7878
run: ./src/main/scripts/execute-command.sh check-pom
79+
run-bootlint:
80+
name: Run Bootstrap linter
81+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
82+
runs-on: ubuntu-20.04
83+
steps:
84+
- name: Clone source code
85+
uses: actions/[email protected] # https://github.com/actions/checkout
86+
with:
87+
# Whether to configure the token or SSH key with the local git config. Default: true
88+
persist-credentials: false
89+
- name: Install bootlint
90+
# https://docs.npmjs.com/cli/v8/commands/npm-install
91+
run: >-
92+
npm install \
93+
--no-audit \
94+
--no-fund \
95+
--global \
96+
97+
- name: Run bootlint
98+
run: ./src/main/scripts/execute-command.sh bootlint

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ before_script:
2020
mysql -u root -e 'CREATE DATABASE mystamps CHARACTER SET utf8;';
2121
mkdir -p /tmp/uploads /tmp/preview;
2222
cp src/main/resources/test/test.png /tmp/uploads/1.png;
23-
npm install -g [email protected];
2423
sudo add-apt-repository -y ppa:jblgf0/python;
2524
sudo apt-get -qq update;
2625
sudo apt-get install -y shellcheck python3.6 python3-pip;

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

+2-13
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-
BOOTLINT_STATUS=
6261
RFLINT_STATUS=
6362
SHELLCHECK_STATUS=
6463
JEST_STATUS=
@@ -75,7 +74,6 @@ if [ "${SPRING_PROFILES_ACTIVE:-}" = 'travis' ] && [ "${TRAVIS_PULL_REQUEST:-fal
7574
DANGER_STATUS=
7675
fi
7776

78-
BOOTLINT_TIME=0
7977
RFLINT_TIME=0
8078
SHELLCHECK_TIME=0
8179
JEST_TIME=0
@@ -134,7 +132,6 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
134132

135133
if [ "$AFFECTS_TRAVIS_CFG" = 'no' ]; then
136134
if [ "$AFFECTS_HTML_FILES" = 'no' ]; then
137-
BOOTLINT_STATUS=skip
138135
HTML_STATUS=skip
139136
fi
140137
[ "$AFFECTS_ROBOT_FILES" != 'no' ] || RFLINT_STATUS=skip
@@ -157,13 +154,6 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
157154

158155
echo
159156

160-
if [ "$BOOTLINT_STATUS" != 'skip' ]; then
161-
START_TIME=$SECONDS
162-
"$EXEC_CMD" bootlint >bootlint.log 2>&1 || BOOTLINT_STATUS=fail
163-
BOOTLINT_TIME=$((SECONDS - START_TIME))
164-
fi
165-
print_status "$BOOTLINT_STATUS" "$BOOTLINT_TIME" 'Run bootlint'
166-
167157
if [ "$RFLINT_STATUS" != 'skip' ]; then
168158
START_TIME=$SECONDS
169159
"$EXEC_CMD" rflint >rflint.log 2>&1 || RFLINT_STATUS=fail
@@ -244,7 +234,6 @@ fi
244234
print_status "$DANGER_STATUS" "$DANGER_TIME" 'Run danger'
245235

246236
if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
247-
[ "$BOOTLINT_STATUS" = 'skip' ] || print_log bootlint.log 'Run bootlint'
248237
[ "$RFLINT_STATUS" = 'skip' ] || print_log rflint.log 'Run robot framework lint'
249238
[ "$SHELLCHECK_STATUS" = 'skip' ] || print_log shellcheck.log 'Run shellcheck'
250239
[ "$JEST_STATUS" = 'skip' ] || print_log jest.log 'Run JavaScript unit tests'
@@ -262,8 +251,8 @@ if [ "$DANGER_STATUS" != 'skip' ]; then
262251
print_log danger.log 'Run danger'
263252
fi
264253

265-
rm -f bootlint.log rflint.log shellcheck.log jest.log validator.log enforcer.log test.log codenarc.log spotbugs.log verify.log danger.log ansible_lint.log
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
266255

267-
if echo "$BOOTLINT_STATUS$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
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
268257
exit 1
269258
fi

0 commit comments

Comments
 (0)