Skip to content

Merge pull request #52 from aws-samples/fix-timeout #51

Merge pull request #52 from aws-samples/fix-timeout

Merge pull request #52 from aws-samples/fix-timeout #51

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- master
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 Nodejs 18
uses: actions/setup-node@v1
with:
node-version: 18
- 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 node dependencies
run: npm i
- 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: Frontend unit tests
run: npm test
- name: CloudFormation lint test
run: cfn-lint src/cfn/**/*.yaml
- name: CloudFormation nag test
run: cfn_nag_scan --input-path src/cfn