From d9777a68c7b3efec5ffec55d59448e8bad934313 Mon Sep 17 00:00:00 2001 From: Pepe Fagoaga Date: Thu, 1 Sep 2022 16:37:10 +0200 Subject: [PATCH] chore(lint&test): Prowler 3.0 (#1357) --- .github/workflows/pull-request.yml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000000..da1fedf610 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,41 @@ +name: Lint & Test + +on: + push: + branches: + - 'prowler-3.0-dev' + pull_request: + branches: + - 'prowler-3.0-dev' + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pipenv + pipenv install + - name: Bandit + run: | + pipenv run bandit -q -lll -x '*_test.py,./contrib/' -r . + - name: Safety + run: | + pipenv run safety check + - name: Vulture + run: | + pipenv run vulture --exclude "contrib" --min-confidence 100 . + - name: Test with pytest + run: | + pipenv run pytest -n auto