This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
Migration to Codeberg #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bandit | |
on: [push, pull_request] | |
jobs: | |
analyze: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-pipenv | |
restore-keys: | | |
${{ runner.os }}-pip-pipenv | |
- name: Cache pipenv | |
uses: actions/cache@v2 | |
with: | |
path: ~/.local/share/virtualenvs | |
key: ${{ runner.os }}-pipenv-${{ hashFiles('Pipfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pipenv- | |
- name: Setup pipenv | |
run: python -m pip install --upgrade pipenv | |
- name: Install dependencies using pipenv | |
run: | | |
cd $GITHUB_WORKSPACE | |
python -m pipenv install --dev | |
- name: Run Bandit | |
run: | | |
cd $GITHUB_WORKSPACE | |
pipenv run bandit -r tzolkin_calendar tests -f txt -o bandit_out.txt | |
- uses: actions/upload-artifact@v2 | |
if: ${{ always() }} | |
with: | |
name: Bandit Output | |
path: bandit_out.txt |