This is an automated email from the ASF dual-hosted git repository.
style95 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-utilities.git
The following commit(s) were added to refs/heads/master by this push:
new 62e6d84 add GHA status badges; remove travis config (#89)
62e6d84 is described below
commit 62e6d84d815a03f5587a2401cd186a76f4a902dd
Author: David Grove <[email protected]>
AuthorDate: Thu Jan 26 21:17:00 2023 -0500
add GHA status badges; remove travis config (#89)
---
.travis.yml | 36 ------------------------------------
README.md | 19 ++++++++++++++-----
2 files changed, 14 insertions(+), 41 deletions(-)
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 59dad7c..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,36 +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.
-#
-
-# https://docs.travis-ci.com/user/languages/python/
-language: python
-python:
- - "2.7"
- - "3.5"
-
-notifications:
- email: false
- webhooks:
- urls:
- # travis2slack webhook to enable DMs on openwhisk-team.slack.com to PR
authors with TravisCI results
- secure:
"QB708ISeb+8Mp1FPW+dU+TfdfLfgp8e0Xmm0jlMJfFHdH+pWaI6+PFgSGmy3V9wmwDbRsvMKtZQYWCmO8JN8QsnxCWRmshEVvrsNJnvJ5gCfpjc+UY5IeKqucDr4PzMrUPHY4PpmZgWszRHzW2gIdSWMd43iXUsYV8xoW1MYagIGDEqf7OHBLg5p7mjClnqAGsRh8cVJHHls/RE6ziYxwR5752xd3AHiYBwlfB00h1NrY3E5uVPVbe95SHuS8RXRdFKhTar4VB/n36sxaEdJ46gPS4dmPa+AAUVBbyn6ye6a6sNPJfFQslMLAvjCHIEwWiTwYIOEdGHwvD3blBu2cvEhMCr+mxQyILDbJGVJhzC+axgmeoF/anxS5rr/WNsT7qiCM4pNViIu0LXk/6jVCvoy88cUeJDcsImcBRIbAxFrWO+WHBSUsIRrmhXELT3jD7mI+W7QKrRZPv4L0X/gL+IdqpeTF
[...]
-
-# command to install dependencies
-# install: "pip install -r requirements.txt"
-# command to run tests
-
-# Invoke ScanCode tests
-script: ./scancode/test.sh
diff --git a/README.md b/README.md
index f4f7830..5ea8370 100644
--- a/README.md
+++ b/README.md
@@ -17,8 +17,10 @@
#
-->
-[](https://travis-ci.com/github/apache/openwhisk-utilities)
[](http://www.apache.org/licenses/LICENSE-2.0)
+[](https://github.com/apache/openwhisk-utilities/actions/workflows/ci.yaml)
+[](https://github.com/apache/openwhisk-utilities/actions/workflows/scancode.yaml)
+
# OpenWhisk Utilities
@@ -54,8 +56,7 @@ $ git clone https://github.com/apache/openwhisk-utilities.git
2. Run the scancode utility against the root directory of your project or
subdirectory where your code changes live:
```bash
-# Invoke Python utility (works with either Python 2 or 3)
-$ python ./openwhisk-utilities/scancode/scanCode.py $ROOTDIR
+$ python3 ./openwhisk-utilities/scancode/scanCode.py $ROOTDIR
```
It is worth adding a Git [pre-commit
hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) to
automatically run the checks before you can even type in a Git commit message.
Here is a sample `pre-commit` file:
@@ -69,12 +70,20 @@ $ cat /path/to/openwhisk/.git/hooks/pre-commit
# determine openwhisk base directory
root="$(git rev-parse --show-toplevel)"
scancode_path="/path/to/openwhisk-utilities/scancode"
-python $scancode_path/scanCode.py --config $scancode_path/ASF-Release.cfg
--gitignore $root/.gitignore $root
+python3 $scancode_path/scanCode.py --config $scancode_path/ASF-Release.cfg
--gitignore $root/.gitignore $root
```
_Note_: A hook a locally installed, so if you check out the repository again,
you will need to reinstall it.
-If your project repo. is new or does not run scancode yet, you can choose to
create a "pre-build" Bash script that can be included in your Travis CI
integration that includes code similar to Step 1 and 2. You can invoke this
script within the ".travis.yml" file early in your install or build scripts.
+Apache OpenWhisk repositories can be configured to run scancode as part of
their CI process by invoking it
+as a GitHub action. It should be run immediately after the checkout action.
For example:
+```yaml
+ # Checkout just this repo and run scanCode before we do anything else
+ - name: Checkout runtime repo
+ uses: actions/checkout@v3
+ - name: Scan Code
+ uses: apache/openwhisk-utilities/scancode@master
+```
### Issues