Skip to content

Formatting Python code #4

Formatting Python code

Formatting Python code #4

Workflow file for this run

name: ci-workflow
on: [push]
jobs:
ci-job:
runs-on: ubuntu-latest
steps:
- name: clone the repository
uses: actions/checkout@v3
- name: install Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: install cfn_nag
run: |
gem install cfn-nag
- name: cfn_nag
run: |
cfn_nag_scan --input-path template.yaml
- name: install cfn-lint
run: |
pip install cfn-lint
- name: cfn-lint
run: |
cfn-lint template.yaml
- name: install bandit
run: |
pip install bandit
- name: bandit checks
run: |
bandit -r sam_sp_ri_utility/app.py --confidence-level high
bandit -r sam_sp_ri_utility/services/*.py --confidence-level high
bandit -r sam_sp_ri_utility/test/utilities.py --confidence-level high
- name: install homebrew and git-secrets
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
brew --version
brew upgrade
brew install git-secrets
sudo cp /home/linuxbrew/.linuxbrew/bin/git-secrets /usr/bin/
- name: git-secrets
run: |
git secrets --scan
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install -r sam_sp_ri_utility/requirements.txt
- name: unit tests
run: |
pytest