-
Notifications
You must be signed in to change notification settings - Fork 388
36 lines (30 loc) · 1.02 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Lint
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install pip
run: |
python -m pip install --upgrade pip
- name: Lint with flake8
run: |
pip install flake8
flake8 ./aws/logs_monitoring/ --count --select=E9,F --show-source --statistics --exclude=*_pb2.py
flake8 ./aws/rds_enhanced_monitoring/ --count --select=E9,F --show-source --statistics
- name: Check formatting with Black
run: |
pip install black
black --check --diff --exclude pb2.py ./aws/logs_monitoring
black --check --diff ./aws/rds_enhanced_monitoring
- name: Check formatting with cfn-lint
run: |
pip install cfn-lint
cfn-lint ./aws/logs_monitoring/*.yaml
cfn-lint ./aws/rds_enhanced_monitoring/*.yaml