Skip to content

Commit

Permalink
ci(lambda): add lint and license check for video conversion lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
tthvo committed Feb 26, 2024
1 parent 4e01020 commit 0d74063
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/lambda-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- synchronize

jobs:
flake8-check:
video-processing-flake8:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
Expand All @@ -36,3 +36,23 @@ jobs:
- name: Run flake8 check
working-directory: app/video-processing
run: make lint

video-conversion-flake8:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
token: ${{ github.token }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: "**/requirements*.txt"
- name: Install dependencies
working-directory: app/video-conversion
run: pip install -r requirements_dev.txt
- name: Run flake8 check
working-directory: app/video-conversion
run: make lint
13 changes: 12 additions & 1 deletion .github/workflows/license-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
working-directory: app/web
run: npm run license:check

lambda-license:
video-processing-lambda-license:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
Expand All @@ -48,3 +48,14 @@ jobs:
- name: Check license headers
working-directory: app/video-processing
run: make check-license

video-conversion-lambda-license:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
token: ${{ github.token }}
- name: Check license headers
working-directory: app/video-conversion
run: make check-license
1 change: 1 addition & 0 deletions app/video-conversion/lambda/requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flake8==7.0.0
5 changes: 5 additions & 0 deletions app/video-conversion/lambda/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
ignore = D203
max-line-length = 200
exclude =
__pycache__

0 comments on commit 0d74063

Please sign in to comment.