From 2a89d50d179f360c2269c3656ee2b94e5f485462 Mon Sep 17 00:00:00 2001 From: Brian Hayden <5826711+bhayden53@users.noreply.github.com> Date: Tue, 23 Feb 2021 12:22:48 -0500 Subject: [PATCH 1/4] code checks github action --- terraform/.github/checks.yml | 61 ++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 terraform/.github/checks.yml diff --git a/terraform/.github/checks.yml b/terraform/.github/checks.yml new file mode 100644 index 00000000..318ce04a --- /dev/null +++ b/terraform/.github/checks.yml @@ -0,0 +1,61 @@ +name: code checks + +on: [push, pull_request] + +jobs: + bandit: + name: run bandit + runs-on: ubuntu-18.04 + + steps: + - name: set up python 3.6.10 + uses: actions/setup-python@v2 + with: + python-version: 3.6.10 + + - name: install dependencies + run: pip install bandit + + - name: checkout code + uses: actions/checkout@v2 + + - name: run bandit security checks + run: bandit -ll -r calcloud + + black: + name: run black + runs-on: ubuntu-18.04 + + steps: + - name: set up python 3.6.10 + uses: actions/setup-python@v2 + with: + python-version: 3.6.10 + + - name: install dependencies + run: pip install black + + - name: checkout code + uses: actions/checkout@v2 + + - name: run black style checks + run: black --check calcloud calcloud/lambda + + flake8: + name: run flake8 + runs-on: ubuntu-18.04 + + steps: + - name: set up python 3.6.10 + uses: actions/setup-python@v2 + with: + python-version: 3.6.10 + + - name: install dependencies + run: pip install flake8 + + - name: checkout code + uses: actions/checkout@v2 + + - name: run flake8 python lint checks + run: flake8 --count --max-line-length=120 --exclude docs From df4a4ac3bbf17083a5b6cffd1a0485dd3e9a4b01 Mon Sep 17 00:00:00 2001 From: Brian Hayden <5826711+bhayden53@users.noreply.github.com> Date: Tue, 23 Feb 2021 12:24:13 -0500 Subject: [PATCH 2/4] moved checks.yml to correct folder --- terraform/.github/{ => workflows}/checks.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename terraform/.github/{ => workflows}/checks.yml (100%) diff --git a/terraform/.github/checks.yml b/terraform/.github/workflows/checks.yml similarity index 100% rename from terraform/.github/checks.yml rename to terraform/.github/workflows/checks.yml From 7abe64bc926fd8623464673c23fcab0fde7c017d Mon Sep 17 00:00:00 2001 From: Brian Hayden <5826711+bhayden53@users.noreply.github.com> Date: Tue, 23 Feb 2021 12:26:15 -0500 Subject: [PATCH 3/4] moved .github folder to right location... --- {terraform/.github => .github}/workflows/checks.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {terraform/.github => .github}/workflows/checks.yml (100%) diff --git a/terraform/.github/workflows/checks.yml b/.github/workflows/checks.yml similarity index 100% rename from terraform/.github/workflows/checks.yml rename to .github/workflows/checks.yml From 04add0d7891f274555410246177d98ea6c289418 Mon Sep 17 00:00:00 2001 From: Brian Hayden <5826711+bhayden53@users.noreply.github.com> Date: Tue, 23 Feb 2021 12:28:17 -0500 Subject: [PATCH 4/4] fixed path to lambdas for black check --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 318ce04a..10c4f34c 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -39,7 +39,7 @@ jobs: uses: actions/checkout@v2 - name: run black style checks - run: black --check calcloud calcloud/lambda + run: black --check calcloud lambda flake8: name: run flake8