From 0f4bc6169d7f354774b13b43cee826523e732f79 Mon Sep 17 00:00:00 2001 From: Artem Ustinov Date: Thu, 14 Jan 2021 00:59:54 -0800 Subject: [PATCH 1/8] Create linter.yml https://github.com/marketplace/actions/super-linter#example-connecting-github-action-workflow --- .github/workflows/linter.yml | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..c188ae2 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,55 @@ +--- +########################### +########################### +## Linter GitHub Actions ## +########################### +########################### +name: Lint Code Base + +# +# Documentation: +# https://help.github.com/en/articles/workflow-syntax-for-github-actions +# + +############################# +# Start the job on all push # +############################# +on: + push: + branches-ignore: [master] + # Remove the line above to run when pushing to master + pull_request: + branches: [master] + +############### +# Set the Job # +############### +jobs: + build: + # Name the Job + name: Lint Code Base + # Set the agent to run on + runs-on: ubuntu-latest + + ################## + # Load all steps # + ################## + steps: + ########################## + # Checkout the code base # + ########################## + - name: Checkout Code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + + ################################ + # Run Linter against code base # + ################################ + - name: Lint Code Base + uses: github/super-linter@v3 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: master + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 678087d06d5f3956222bbea6370e4f889eb69bfb Mon Sep 17 00:00:00 2001 From: Artem Ustinov Date: Thu, 14 Jan 2021 12:19:12 -0800 Subject: [PATCH 2/8] Test VALIDATE_ALL_CODEBASE --- .github/workflows/linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index c188ae2..40406e4 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -50,6 +50,6 @@ jobs: - name: Lint Code Base uses: github/super-linter@v3 env: - VALIDATE_ALL_CODEBASE: false + VALIDATE_ALL_CODEBASE: true DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 6a3cf9504e73117e37129f2ff2dc5a1298902e39 Mon Sep 17 00:00:00 2001 From: Artem Ustinov Date: Thu, 14 Jan 2021 12:43:27 -0800 Subject: [PATCH 3/8] Disable Black and ISort. Set VALIDATE_PYTHON_BLACK and ISORT to false --- .github/workflows/linter.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 40406e4..4ef0890 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -50,6 +50,8 @@ jobs: - name: Lint Code Base uses: github/super-linter@v3 env: - VALIDATE_ALL_CODEBASE: true DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_ALL_CODEBASE: true + VALIDATE_PYTHON_BLACK: false + VALIDATE_PYTHON_ISORT: false From c279d6ba4b4dae9888414e466a3bc61d1ce8df65 Mon Sep 17 00:00:00 2001 From: Artem Ustinov Date: Thu, 14 Jan 2021 13:06:15 -0800 Subject: [PATCH 4/8] Create an Empty `.flake8` Config. --- .github/linters/.flake8 | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/linters/.flake8 diff --git a/.github/linters/.flake8 b/.github/linters/.flake8 new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/linters/.flake8 @@ -0,0 +1 @@ + From 7fd62bdb6f1dd6ee4308b05f9863edb5c8a54dcb Mon Sep 17 00:00:00 2001 From: Artem Ustinov Date: Thu, 14 Jan 2021 13:07:01 -0800 Subject: [PATCH 5/8] Create an Empty `.python-lint` Config. --- .github/linters/.python-lint | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/linters/.python-lint diff --git a/.github/linters/.python-lint b/.github/linters/.python-lint new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/linters/.python-lint @@ -0,0 +1 @@ + From 2357b0f03d8dbd2be68b3525b4ad20fe78021f96 Mon Sep 17 00:00:00 2001 From: Artem Ustinov Date: Thu, 14 Jan 2021 13:08:47 -0800 Subject: [PATCH 6/8] Increment Minor Version in Setup Script. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e4f9c7b..68850ec 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setuptools.setup( name='wavefront-sdk-python', - version='1.7.8', + version='1.7.9', author='Wavefront by VMware', author_email='chitimba@wavefront.com', url='https://github.com/wavefrontHQ/wavefront-sdk-python', From bd1daeaded050224541c14942a7bdad51b318df7 Mon Sep 17 00:00:00 2001 From: Artem Ustinov Date: Thu, 14 Jan 2021 13:58:43 -0800 Subject: [PATCH 7/8] Disable `import-error` as deps aren't installed. --- .github/linters/.python-lint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/linters/.python-lint b/.github/linters/.python-lint index 8b13789..05e714d 100644 --- a/.github/linters/.python-lint +++ b/.github/linters/.python-lint @@ -1 +1 @@ - +disable=import-error From d9addae711ac5cfdd959ea3c86f970e2055d6395 Mon Sep 17 00:00:00 2001 From: Artem Ustinov Date: Thu, 14 Jan 2021 14:06:39 -0800 Subject: [PATCH 8/8] Update .python-lint --- .github/linters/.python-lint | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/linters/.python-lint b/.github/linters/.python-lint index 05e714d..e46e081 100644 --- a/.github/linters/.python-lint +++ b/.github/linters/.python-lint @@ -1 +1,2 @@ +[MESSAGES CONTROL] disable=import-error