name: CI

on: [push, pull_request]

jobs:
  build:
    runs-on: 'ubuntu-latest'

    steps:

    - uses: 'actions/checkout@v2'

    - uses: 'actions/setup-python@v2'
      with:
        python-version: '3.8'

    - name: yamlllint
      run: |
        pip install yamllint==1.24.2
        yamllint module.yml && yamllint test/*.yml

    - name: cfn-lint
      run: |
        pip install cfn-lint==0.34.0
        cfn-lint -t module.yml && cfn-lint -t test/*.yml

    - name: license
      run: |
        grep -q "LICENSE-2.0" module.yml
