-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from awslabs/uploadAssetWorkflow
ci: adding ci tools for backend repository
- Loading branch information
Showing
15 changed files
with
271 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: ci-checks | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python Version | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install Poetry Action | ||
working-directory: backend | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.1.13 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
virtualenvs-path: .venv | ||
installer-parallel: true | ||
|
||
- name: run checks | ||
working-directory: backend | ||
run: make all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = E203 | ||
exclude = | ||
./backend/common/* | ||
./backend/handlers/* | ||
.git | ||
.venv | ||
__pycache__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ htmlcov/ | |
.nox/ | ||
.coverage | ||
.coverage.* | ||
.coveragerc | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
from typing import Any, Dict | ||
from aws_lambda_powertools import Logger | ||
from aws_lambda_powertools.utilities.typing import LambdaContext | ||
|
||
logger = Logger() | ||
|
||
|
||
def lambda_handler(event: Dict[str, Any], context: LambdaContext) -> None: | ||
logger.info("Starting uploadAssetWorkflow") | ||
|
||
|
||
def add(a: int, b: int) -> int: | ||
return a+b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
lint: | ||
poetry run flake8 | ||
|
||
typecheck: | ||
poetry run mypy . | ||
|
||
coverage: | ||
poetry run coverage run -m pytest | ||
poetry run coverage report | ||
|
||
install: | ||
poetry install | ||
|
||
all: install lint typecheck coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[mypy] | ||
ignore_errors = True | ||
exclude = | ||
.venv | ||
|
||
[mypy-backend.functions.*] | ||
disallow_untyped_defs = True | ||
ignore_errors = False | ||
ignore_missing_imports = False | ||
disallow_any_unimported = True | ||
no_implicit_optional = True | ||
warn_return_any = True | ||
warn_unused_ignores = True |
Oops, something went wrong.