Translation of 'intermediate' section #1432
Workflow file for this run
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: Unit Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- edited | |
- synchronize | |
jobs: | |
unit_tests: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# Cache | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
# Setup | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' # have to use quotes due to 0 being removed | |
- name: Install python packages | |
run: pip install -Ur requirements.txt | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.1 | |
- name: Install Ruby gems | |
run: gem install cfn-nag | |
# Run Tests | |
- name: CloudFormation lint test | |
run: cfn-lint code/solutions/**/*.yaml --ignore-templates code/solutions/policy-as-code-with-guard/example_bucket_tests.yaml | |
- name: CloudFormation nag test | |
run: cfn_nag_scan --input-path code/solutions --ignore-fatal |