diff --git a/.bazelrc b/.bazelrc
index c5923401..3a8a0283 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1,4 +1,4 @@
-# Reduce OOM errors on TravisCI
+# Reduce OOM errors on CI
startup --host_jvm_args=-Xms500m
startup --host_jvm_args=-Xmx500m
startup --host_jvm_args=-XX:-UseParallelGC
diff --git a/c/clang_check.sh b/c/clang_check.sh
index 17b6f038..24400152 100644
--- a/c/clang_check.sh
+++ b/c/clang_check.sh
@@ -22,7 +22,7 @@ RETURN=0
for FILE in `ls *.[ch] */*.[ch]`; do
DIFF=`diff $FILE <($CLANG_FORMAT $FILE)`
if [ $? -ne 0 ]; then
- if [ -z "$TRAVIS" ]; then
+ if [ -z "$GITHUB_WORKFLOW" ]; then
echo "Formatting $FILE" >&2
$CLANG_FORMAT -i $FILE
else
diff --git a/cpp/clang_check.sh b/cpp/clang_check.sh
index 3d747059..f1679789 100644
--- a/cpp/clang_check.sh
+++ b/cpp/clang_check.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# Check formatting of C++ source files using clang-format.
-# If running on TravisCI, will display the lines that need changing,
+# If running on CI, will display the lines that need changing,
# otherwise it will format the files in place.
CLANG_FORMAT="clang-format-5.0"
@@ -25,7 +25,7 @@ RETURN=0
for FILE in `ls *.cc *.h`; do
DIFF=`diff $FILE <($CLANG_FORMAT $FILE)`
if [ $? -ne 0 ]; then
- if [ -z "$TRAVIS" ]; then
+ if [ -z "$GITHUB_WORKFLOW" ]; then
echo "Formatting $FILE" >&2
$CLANG_FORMAT -i $FILE
else
diff --git a/dart/README.md b/dart/README.md
index b2080d11..5bdf1af0 100644
--- a/dart/README.md
+++ b/dart/README.md
@@ -10,12 +10,10 @@ To format your files, just run `format_check.sh` or:
dartfmt --fix --overwrite .
```
-The TravisCI test **will fail if any files need formatting**.
-
## Hints
-The TravisCI test uses `dartanalyzer` to check the library for improvements. IF
-any are found the TravisCI tests **will fail**.
+The CI test uses `dartanalyzer` to check the library for improvements. IF
+any are found the CI tests **will fail**.
## Testing
diff --git a/dart/checks.sh b/dart/checks.sh
index d411fb1a..15541041 100644
--- a/dart/checks.sh
+++ b/dart/checks.sh
@@ -22,21 +22,17 @@ RETURN=0
for FILE in `find * | egrep "\.dart$"`; do
FORMATTED=`$DART_FMT_CMD --set-exit-if-changed --fix "$FILE"`
if [ $? -ne 0 ]; then
- if [ -z "$TRAVIS" ]; then
+ if [ -z "$GITHUB_WORKFLOW" ]; then
# Running locally, we can just format the file. Use colour codes.
echo -e "\e[1;34m"
$DART_FMT_CMD --fix --overwrite $FILE
echo -e "\e[0m"
else
- # On TravisCI, send a comment with the diff to the pull request.
+ # On CI, show the diff.
DIFF=`echo "$FORMATTED" | diff $FILE -`
echo -e "\e[1;31mFile has formatting errors: $FILE\e[0m"
echo "$DIFF"
RETURN=1
- go run ../travis-utils/github_comments.go --pr "$TRAVIS_PULL_REQUEST" \
- --comment '**File has `dartfmt` errors that must be fixed**. Here is a diff, or run `checks.sh`:'"
$DIFF" \ - --file "dart/$FILE" \ - --commit "$TRAVIS_PULL_REQUEST_SHA" fi fi ANALYSIS=`$DART_ANALYZER_CMD "$FILE"` @@ -44,13 +40,8 @@ for FILE in `find * | egrep "\.dart$"`; do if [ $? -ne 0 ]; then echo -e "\e[1;31mStatic analysis problems: $FILE\e[0m" echo "$ANALYSIS" - if [ "$TRAVIS" != "" ]; then - # On TravisCI, send a comment with the diff to the pull request. + if [ -n "$GITHUB_WORKFLOW" ]; then RETURN=1 - go run ../travis-utils/github_comments.go --pr "$TRAVIS_PULL_REQUEST" \ - --comment '**File has `dartanalyzer` errors that must be addressed**:'"
$ANALYSIS" \ - --file "dart/$FILE" \ - --commit "$TRAVIS_PULL_REQUEST_SHA" fi fi done diff --git a/js/README.md b/js/README.md index 0a18be69..117e1e6b 100644 --- a/js/README.md +++ b/js/README.md @@ -34,7 +34,7 @@ dependencies, run `eslint` and then run the tests as long as there were no eslint errors. Unit tests are automatically run on pull and push requests and visible at -https://travis-ci.org/google/open-location-code. +https://github.com/google/open-location-code/actions. # Examples diff --git a/js/checks.sh b/js/checks.sh index 63ca0229..5eb4d8e0 100644 --- a/js/checks.sh +++ b/js/checks.sh @@ -1,6 +1,5 @@ #!/bin/bash # Run lint checks on files in the Javascript directory. -# When running within TravisCI, post comments back to the pull request. # Also converts the test CSV files to JSON ready for the tests to execute. # Note: must run within the JS directory. if [ `basename "$PWD"` != "js" ]; then @@ -46,14 +45,6 @@ else echo -e "\e[1;31mFile has formatting errors:\e[0m" echo "$LINT" RETURN=1 - if [ -v TRAVIS ]; then - # On TravisCI, send a comment with the diff to the pull request. - go run ../travis-utils/github_comments.go \ - --comment '**File has `eslint` errors that must be fixed**:'"
$LINT" \ - --file "js/$FILE" \ - --pr "$TRAVIS_PULL_REQUEST" \ - --commit "$TRAVIS_PULL_REQUEST_SHA" - fi fi fi exit $RETURN diff --git a/js/closure/README.md b/js/closure/README.md index c0c1c1ac..9679bfac 100644 --- a/js/closure/README.md +++ b/js/closure/README.md @@ -24,8 +24,7 @@ npm install eslint eslint closure/*js ``` -If there are any syntax or style errors, it will output messages. Note that -syntax or style errors will cause the TravisCI tests to **fail**. +If there are any syntax or style errors, it will output messages. ## Building and Testing diff --git a/python/README.md b/python/README.md index e0888f0b..5ac8f9d0 100644 --- a/python/README.md +++ b/python/README.md @@ -44,7 +44,7 @@ bash format_check.sh If you just want to see the changes, you can run `python -m yapf --diff *py` -This script runs as part of the TravisCI tests - if files need formatting it +This script runs as part of the CI tests - if files need formatting it will display the required changes **and fail the test**. diff --git a/python/format_check.sh b/python/format_check.sh index df4cd307..67ff1517 100644 --- a/python/format_check.sh +++ b/python/format_check.sh @@ -13,8 +13,8 @@ if [ $? -eq 0 ]; then exit 0 fi -if [ -z "$TRAVIS" ]; then - # Not running on TravisCI, so format the files in place. +if [ -z "$GITHUB_WORKFLOW" ]; then + # Not running on CI, so format the files in place. echo -e "\e[34mPython files have formatting errors -formatting in place\e[30m" python -m yapf --in-place *py else diff --git a/ruby/README.md b/ruby/README.md index 943bcc21..97a8ede7 100644 --- a/ruby/README.md +++ b/ruby/README.md @@ -20,7 +20,7 @@ gem install rubocop rubocop --config rubocop.yml ``` -If you can't run it yourself, it is run as part of the TravisCI tests. +If you can't run it yourself, it is run as part of the CI tests. ### Testing diff --git a/rust/README.md b/rust/README.md index 2ab7b6e3..852db86b 100644 --- a/rust/README.md +++ b/rust/README.md @@ -6,7 +6,7 @@ This is the Rust implementation of the Open Location Code library. Code must be formatted with `rustfmt`. You can do this by running `cargo fmt`. -The formatting will be checked in the TravisCI integration tests. If the files +The formatting will be checked in the CI integration tests. If the files need formatting the tests will fail. ## Testing