Skip to content

Commit

Permalink
add flake8 workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianhao-Gu committed Aug 31, 2021
1 parent cf6b073 commit 151fc0f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lintly Flake8

on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: pip install flake8 lintly
- uses: grantmcconnaughey/lintly-flake8-github-action@v1.0
with:
# The GitHub API token to create reviews with
token: ${{ secrets.GITHUB_TOKEN }}
# Fail if "new" violations detected or "any", default "new"
failIf: new
# Additional arguments to pass to flake8, default "." (current directory)
args: "--max-line-length=99 --exclude=lib/installed_clients/,lib/kb_uploadmethods/kb_uploadmethodsServer.py --ignore=E305,E265 ."
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ build-test-script:
echo 'export KB_AUTH_TOKEN=`cat /kb/module/work/token`' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME)
echo 'export PYTHONPATH=$$script_dir/../$(LIB_DIR):$$PATH:$$PYTHONPATH' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME)
echo 'cd $$script_dir/../$(TEST_DIR)' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME)
echo 'python -m nose --with-coverage --cover-package=$(SERVICE_CAPS) --cover-html --cover-html-dir=/kb/module/work/test_coverage --nocapture .' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME)
echo 'python -m nose --with-coverage --cover-package=$(SERVICE_CAPS) --cover-html --cover-html-dir=/kb/module/work/test_coverage --cover-xml --cover-xml-file=/kb/module/work/test_coverage/coverage.xml --nocapture --nologcapture $(TARGET_TESTS)' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME)
chmod +x $(TEST_DIR)/$(TEST_SCRIPT_NAME)

test:
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# kb_uploadmethods

[![Build Status](https://travis-ci.org/tgu/kb_uploadmethods.svg?branch=master)](https://travis-ci.org/tgu/kb_uploadmethods)
## Current Status

| Branch | Build | Coverage | LGTM Alerts |
| --- | --- | --- | --- |
| master | [![KBase SDK Tests](https://github.com/kbaseapps/kb_uploadmethods/workflows/KBase%20SDK%20Tests/badge.svg)](https://github.com/kbaseapps/kb_uploadmethods/actions?query=workflow%3A%22KBase+SDK+Tests%22) | [![codecov](https://codecov.io/gh/kbaseapps/kb_uploadmethods/branch/master/graph/badge.svg?token=GXuMPxDUP5)](https://codecov.io/gh/kbaseapps/kb_uploadmethods) | [![Total alerts](https://img.shields.io/lgtm/alerts/g/kbaseapps/kb_uploadmethods.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kbaseapps/kb_uploadmethods/alerts/) |


[Release Notes](RELEASE_NOTES.md)

## Description
Expand Down
5 changes: 5 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ignore:
- "lib/installed_clients"
- "lib/kb_uploadmethods/kb_uploadmethodsServer.py"
- "lib/kb_uploadmethods/authclient.py"
- "lib/kb_uploadmethods/baseclient.py"

0 comments on commit 151fc0f

Please sign in to comment.