This is an automated email from the ASF dual-hosted git repository.

arvindsh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluo-muchos.git


The following commit(s) were added to refs/heads/main by this push:
     new c46aa98  Implement CI using GitHub Actions (#374)
c46aa98 is described below

commit c46aa98b5f7671bb55ffc0721c3f16197a95444f
Author: Arvind Shyamsundar <arvin...@apache.org>
AuthorDate: Fri Oct 2 08:28:39 2020 -0700

    Implement CI using GitHub Actions (#374)
    
    - Remove erstwhile Travis CI job
    - Replace references to Travis CI in docs, with GitHub Actions
    - Update README to use GitHub Actions workflow badge
    - Use `tail -c` so that the cibuild script works on Mac as well
---
 .github/workflows/ci.yaml | 50 +++++++++++++++++++++++++++++++++++++++++++++++
 .travis.yml               | 21 --------------------
 CONTRIBUTING.md           |  2 +-
 README.md                 | 10 +++++-----
 scripts/checkMissingEOF   |  2 +-
 5 files changed, 57 insertions(+), 28 deletions(-)

diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 0000000..18274f6
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,50 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# This GitHub Actions workflow will prepare a environment with Python 3.6
+# and the required Python packages, to run the CI tests
+# (Ansible-lint, Flake8 etc.) for Fluo-Muchos.
+# See also:
+#   
https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python
+
+name: CI
+
+on:
+  push:
+    branches: [ '*' ]
+  pull_request:
+    branches: [ '*' ]
+
+jobs:
+  build:
+    name: ${{ matrix.os }}
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os: [ubuntu-latest, macOS-latest]
+    timeout-minutes: 10
+    steps:
+    - uses: actions/checkout@v1
+    - uses: actions/setup-python@v2
+      with:
+        python-version: '3.6'
+    - name: Install required packages
+      run: pip install -r ./lib/requirements.txt
+    - name: Run Fluo-Muchos CI script
+      run: ./scripts/cibuild
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 5cb19a5..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-language: python
-python:
-  - "3.5"
-install:
-  - pip install -r ./lib/requirements.txt
-script:
-  - ./scripts/cibuild
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 630d76b..f0f9c2b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -37,7 +37,7 @@ If you are modifying any of the Python code in this project, 
please use [Black](
 black lib --line-length 79
 ```
 
-The [CI](https://github.com/apache/fluo-muchos/tree/main/.travis.yml) for this 
project runs tools to detect common coding issues with Python and Ansible 
files. Rather than wait for the CI to flag any issues with your work, please 
run the 
[cibuild](https://github.com/apache/fluo-muchos/tree/main/scripts/cibuild.sh) 
script on your dev machine, which in turn runs the following tools:
+The 
[CI](https://github.com/apache/fluo-muchos/tree/main/.github/workflows/ci.yaml) 
for this project runs tools to detect common coding issues with Python and 
Ansible files. Rather than wait for the CI to flag any issues with your work, 
please run the 
[cibuild](https://github.com/apache/fluo-muchos/tree/main/scripts/cibuild.sh) 
script on your dev machine, which in turn runs the following tools:
 - [flake8](https://github.com/pycqa/flake8) to validate that the Python code 
in the project conforms to known good practices.
 - [Ansible-lint](https://github.com/ansible/ansible-lint/) prior to submitting 
a PR. This will ensure that you align with known good practices. Please also 
review the guidance on [false 
positives](https://docs.ansible.com/ansible-lint/rules/rules.html#false-positives-skipping-rules)
 from Ansible-lint.
 
diff --git a/README.md b/README.md
index 925cc3e..b08b202 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 ![Muchos][logo]
 ---
-[![Build Status][ti]][tl] [![Apache License][li]][ll]
+[![Build Status][ci]][ga] [![Apache License][li]][ll]
 
 **Muchos automates setting up [Apache Accumulo][accumulo] or [Apache 
Fluo][fluo] (and their dependencies) on a cluster**
 
@@ -48,7 +48,7 @@ ssh-add ~/.ssh/id_rsa
 
 Muchos requires the following for EC2 installations:
 
-* [awscli] (version 2) & [boto3] libraries - Install using `pip3 install 
awscli2 boto3 --upgrade` 
+* [awscli] (version 2) & [boto3] libraries - Install using `pip3 install 
awscli2 boto3 --upgrade`
 * Note: if using Ubuntu you may need to install botocore separately using 
`pip3 install awscli boto3 botocore`
 * An AWS account with your SSH public key uploaded. When you configure 
[muchos.props], set `key.name`
   to name of your key pair in AWS.
@@ -232,7 +232,7 @@ to this swarm. When this is set, docker will be installed 
on all nodes of the cl
 recommended that the swarm manager is specified on a worker node as it runs 
docker containers. Check
 out [Portainer] if you want to run a management UI for your swarm cluster.
 
-7. `elkserver` - Sets up the Elasticsearch, Logstash, and Kibana stack. This 
allows logging data to be search, analyzed, and visualized in real time. 
+7. `elkserver` - Sets up the Elasticsearch, Logstash, and Kibana stack. This 
allows logging data to be search, analyzed, and visualized in real time.
 
 If you run the `muchos setup` command and a failure occurs, you can repeat the 
command until setup
 completes. Any work that was successfully completed will not be repeated. 
While some setup steps can
@@ -375,8 +375,8 @@ Muchos is powered by the following projects:
 [boto]: http://boto.cloudhackers.com/en/latest/
 [boto3]: https://github.com/boto/boto3
 [Ansible]: https://www.ansible.com/
-[ti]: https://travis-ci.org/apache/fluo-muchos.svg?branch=main
-[tl]: https://travis-ci.org/apache/fluo-muchos
+[ci]: https://github.com/apache/fluo-muchos/workflows/CI/badge.svg
+[ga]: https://github.com/apache/fluo-muchos/actions
 [li]: http://img.shields.io/badge/license-ASL-blue.svg
 [ll]: https://github.com/apache/fluo-muchos/blob/main/LICENSE
 [logo]: contrib/muchos-logo.png
diff --git a/scripts/checkMissingEOF b/scripts/checkMissingEOF
index bf479cd..05e546f 100755
--- a/scripts/checkMissingEOF
+++ b/scripts/checkMissingEOF
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 if grep --quiet --files-with-matches --binary-files=without-match 
--max-count=1 --regexp='.*' "$1"; then
-  if [ "$(tail --bytes=1 "$1")" ]; then
+  if [ "$(tail -c 1 "$1")" ]; then
     echo "ERROR: No new line at end of $1."; false;
   fi
 fi

Reply via email to