Skip to content

Continuous Integration #496

Continuous Integration

Continuous Integration #496

Workflow file for this run

name: Continuous Integration
on:
push:
pull_request:
branches:
- main
env:
VERSION: "1.0.2"
jobs:
testRules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run guard rules tests
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/aws-cloudformation/cloudformation-guard/main/install-guard.sh | sh
export PATH=${PATH}:~/.guard/bin
cfn-guard test -d ./rules/
## If test fails run step to pull out only failed tests
- name: Display Failed Rules Only
if: ${{ failure() }}
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/aws-cloudformation/cloudformation-guard/main/install-guard.sh | sh
export PATH=${PATH}:~/.guard/bin
cfn-guard test -d ./rules/ | grep "FAIL Rules:" -B 2 -A 1
buildRuleSet:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- run: |
chmod +x ./mappings/build.py
python3 ./mappings/build.py -r $VERSION
shell: bash
- uses: actions/upload-artifact@v3
with:
name: ruleset-build
path: |
docker/output/
mappings/rule_set_guard_rules_registry_all_rules.json
if-no-files-found: error