Skip to content

Commit 476a960

Browse files
Issue #16830: migrate from Travis CI to GitHub Actions in configuration files
1 parent 720de88 commit 476a960

16 files changed

+14
-186
lines changed

.ci/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ ATTENTION:
66
Example of usage:
77
./.ci/validation.sh all-sevntu-checks
88

9-
export TRAVIS_PULL_REQUEST="" && ./.ci/validation.sh releasenotes-gen
9+
./.ci/validation.sh releasenotes-gen

.ci/checkchmod.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
set -e
44

5-
# On Travis, after clone, all files are with 644 permission, on local they are 664,
6-
# so we check only executable bit
5+
# Ensure non '.sh' files are not executable and have mode 664
76
CHMOD=$(find -type f -not -path '*/\.git/*' \
87
-a -type f -not -name '*.sh' \
98
-a -type f -not -name '*.pl' \
@@ -18,7 +17,7 @@ if [[ -n $CHMOD ]]; then
1817
exit 1;
1918
fi
2019

21-
# On Travis, after clone, all 'sh' files have executable bit
20+
# Ensure all '.sh' files have executable bit set
2221
CHMOD=$(find -type f -not -path '*/\.git/*' -a -type f -name '*.sh' -a -not -executable)
2322
if [[ -n $CHMOD ]]; then
2423
echo "Expected mode for '.sh' files is 755.";

.ci/codenarc.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Attention, there is no "-x" to avoid problems on Travis
2+
# Attention, this script is used with GitHub Actions
33
set -e
44

55
CODENARC_REPORT=$(groovy ./.ci/codenarc.groovy ./.ci/ *.groovy)

.ci/common.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Attention, there is no "-x" to avoid problems on Travis
2+
# Attention, there is no "-x" to avoid issues during execution
33
set -e
44

55
DEBUG=true

.ci/pr-description.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Attention, there is no "-x" to avoid problems on Travis
2+
# Attention, there is no "-x" to avoid issues during execution
33
set -e
44

55
if [[ ! $PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi

.ci/releasenotes-gen.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Attention, there is no "-x" to avoid problem on Travis
2+
# Attention: script uses 'set -e' for fail-fast behavior
33
# to run on local:
44
# export READ_ONLY_TOKEN=9ffd28f
55
# && export DRONE_PULL_REQUEST="master" && ./.ci/releasenotes-gen.sh
@@ -35,7 +35,7 @@ cd .ci-temp/contribution/releasenotes-builder
3535
mvn -e --no-transfer-progress clean compile package
3636
cd ../../../
3737

38-
# we need to do full clone as Travis do "git clone --depth=50"
38+
# Perform full clone to ensure all tags and commit history are available
3939
if [ -d .ci-temp/checkstyle ]; then
4040
cd .ci-temp/checkstyle/
4141
git reset --hard origin/master

.ci/travis.sh

-91
This file was deleted.

.travis.yml

-50
This file was deleted.

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
*Checkstyle is a tool that ensures adherence to a code standard or a set of best practices.*
88

9-
[![][travis img]][travis]
109
[![][appveyor img]][appveyor]
1110
[![][circleci img]][circleci]
1211
[![][cirrusci img]][cirrusci]
@@ -140,9 +139,6 @@ Checkstyle uses libraries:
140139
- [Google Guava](https://github.com/google/guava/)
141140
- [Picocli](https://github.com/remkop/picocli/)
142141
143-
[travis]:https://travis-ci.com/github/checkstyle/checkstyle/builds
144-
[travis img]:https://api.travis-ci.com/checkstyle/checkstyle.svg
145-
146142
[appveyor]:https://ci.appveyor.com/project/checkstyle/checkstyle/history
147143
[appveyor img]:https://ci.appveyor.com/api/projects/status/rw6bw3dl9kph6ucc?svg=true
148144

azure-pipelines.yml

-8
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,6 @@ strategy:
100100
image: 'macOS-14'
101101
cmd: "JAVA_HOME=$JAVA_HOME_17_X64 mvn -e --no-transfer-progress verify"
102102

103-
# moved back to Travis till we find a way to keep secrets in azure
104-
# ensure that all modules are used in no exception configs
105-
# 'verify-no-exception-configs':
106-
# image: 'ubuntu-24.04'
107-
# cmd: "./.ci/validation.sh verify-no-exception-configs"
108-
# skipCache: true
109-
# needXmlstarlet: true
110-
111103
# versions to update
112104
'versions':
113105
image: 'ubuntu-24.04'

config/deploy-settings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
https://maven.apache.org/xsd/settings-1.0.0.xsd">
55
<servers>
66
<server>
7-
<!-- this config is used by our TravisCI to deploy snapshot artifacts to maven repo -->
7+
<!-- this config is used by GitHub Actions to deploy snapshot artifacts to Maven repo -->
88
<id>sonatype-nexus-snapshots</id>
99
<username>${env.CI_DEPLOY_USERNAME}</username>
1010
<password>${env.CI_DEPLOY_PASSWORD}</password>

config/jsoref-spellchecker/whitelist.words

+1-5
Original file line numberDiff line numberDiff line change
@@ -298,14 +298,12 @@ detailast
298298
detailnodetreestringprinter
299299
devops
300300
Dexec
301-
Dexpression
302301
dfa
303302
DFFF
304303
Dfile
305304
dfn
306305
Dfoo
307306
Dforbiddenapis
308-
Dforce
309307
Dgpg
310308
Dhttp
311309
Diachenko
@@ -850,7 +848,6 @@ mozilla
850848
MRELEASE
851849
mstudman
852850
MTAGLIST
853-
mtime
854851
multicharacter
855852
multiline
856853
Multimap
@@ -995,7 +992,7 @@ ORELSEGET
995992
orm
996993
Osgi
997994
oss
998-
osx
995+
OSX
999996
otechie
1000997
outertypefilename
1001998
outertypenumber
@@ -1070,7 +1067,6 @@ Pointcut
10701067
POJO
10711068
Popup
10721069
Postgresql
1073-
ppc
10741070
prebuilts
10751071
PRESIZE
10761072
prettyprint

pom.xml

-10
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,6 @@
196196
<system>GitHub Issues</system>
197197
<url>https://github.com/checkstyle/checkstyle/issues</url>
198198
</issueManagement>
199-
<ciManagement>
200-
<system>travis</system>
201-
<url>https://travis-ci.org/checkstyle/checkstyle</url>
202-
</ciManagement>
203199

204200
<properties>
205201
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -2091,11 +2087,6 @@
20912087
<excludedLink>http://www.mojohaus.org/exec-maven-plugin</excludedLink>
20922088
<excludedLink>http://www.mojohaus.org/versions-maven-plugin</excludedLink>
20932089
<excludedLink>http://www.mojohaus.org/xml-maven-plugin</excludedLink>
2094-
<!-- SSL -->
2095-
<excludedLink>https://travis-ci.org/</excludedLink>
2096-
<excludedLink>https://travis-ci.org/checkstyle/checkstyle</excludedLink>
2097-
<excludedLink>https://coveralls.io/r/checkstyle/checkstyle</excludedLink>
2098-
20992090
<!-- we did too many requests to GitHub,
21002091
now GitHub reject all requests "429 Too Many Requests" -->
21012092
<excludedLink>https://github.com/*</excludedLink>
@@ -2186,7 +2177,6 @@
21862177
<excludedLink>https://www.mojohaus.org/exec-maven-plugin</excludedLink>
21872178
<!-- permanent 403 -->
21882179
<excludedLink>https://www.ej-technologies.com/*</excludedLink>
2189-
<excludedLink>https://travis-ci.com/</excludedLink>
21902180
<excludedLink>https://stackoverflow.com/questions/*</excludedLink>
21912181
<!-- permanent 403 -->
21922182
<excludedLink>https://docs.github.com/en/rest/checks</excludedLink>

src/site/xdoc/contributing.xml

+4-6
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,10 @@
165165
</p>
166166

167167
<p>
168-
After submitting a Pull Request, it will be automatically checked by
169-
<a href="https://travis-ci.org/checkstyle/checkstyle">Travis</a> and other continuous
170-
integration (CI) services.
171-
Therefore, please recheck after some minutes that the CIs didn't
172-
find any issues with your changes. If there are issues, please fix them by amending
173-
commit (not by separate commit) and provide an updated version of the same Pull Request.
168+
After submitting a Pull Request, it will be automatically checked by the project's
169+
continuous integration (CI) workflows. Please verify that all checks pass successfully.
170+
If there are issues, update your pull request by amending your commit (instead of adding
171+
new commits) and pushing the changes again.
174172
</p>
175173

176174
<p>

src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilterTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ private static boolean isConnectionAvailableAndStable(String url) throws Excepti
237237
break;
238238
}
239239
catch (IOException ex) {
240-
// for some reason Travis CI failed sometimes (unstable) on reading the file
241240
if (attemptCount < attemptLimit && ex.getMessage().contains("Unable to read")) {
242241
attemptCount++;
243242
available = false;

src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoaderTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ private static FilterSet loadFilterSet(String url) throws Exception {
202202
break;
203203
}
204204
catch (CheckstyleException ex) {
205-
// for some reason Travis CI failed sometimes (unstable) on reading this file
206205
if (attemptCount < attemptLimit && ex.getMessage().contains("Unable to read")) {
207206
attemptCount++;
208207
// wait for bad/disconnection time to pass

0 commit comments

Comments
 (0)