Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 65472bc

Browse files
Merge pull request #9 from madeiramadeirabr/github_workflows
adicao de arquivo para pylint
2 parents d4ec131 + 369f888 commit 65472bc

File tree

8 files changed

+168
-3
lines changed

8 files changed

+168
-3
lines changed

.github/workflows/pylint.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Summary:
2+
# Execute the pylint analysis on code
3+
# Read here for mode info: https://pylint.pycqa.org/en/latest/ and https://www.python.org/dev/peps/pep-0008/
4+
5+
name: Execute the pylint analysis
6+
7+
#on:
8+
# # There are several ways to trigger Github actions - See https://help.github.com/en/actions/reference/events-that-trigger-workflows#example-using-a-single-event for a comprehensive list:
9+
# # - "push": Triggers each time a commit is pushed
10+
# # - "pull_request": Triggers each time a commit is pushed within a pull request, it makes it much easier to write comments within the PR, but it suffers some strong limitations:
11+
# # - There is no way to trigger when a PR is merged into another - See https://github.community/t/pull-request-action-does-not-run-on-merge/16092?u=vadorequest
12+
# # - It won't trigger when the PR is conflicting with its base branch - See https://github.community/t/run-actions-on-pull-requests-with-merge-conflicts/17104/2?u=vadorequest
13+
# push: # Triggers on each pushed commit
14+
# branches:
15+
# - 'master'
16+
on: [push]
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
# python-version: [ '3.x', 'pypy-3.7', 'pypy-3.8' ]
24+
python-version: ["3.8", "3.9", "3.10"]
25+
name: Python ${{ matrix.python-version }} sample
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Set up Python
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
architecture: x64
33+
cache: 'pip'
34+
- name: Install dependencies
35+
- run: |
36+
python -m pip install --upgrade pip
37+
pip install pylint
38+
- name: Analysing the code with pylint
39+
- run: pylint app.py lambda_app tests
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Summary:
2+
# Execute the pylint analysis on code
3+
# Read here for mode info: https://pylint.pycqa.org/en/latest/ and https://www.python.org/dev/peps/pep-0008/
4+
5+
name: Execute the pylint analysis
6+
7+
#on:
8+
# # There are several ways to trigger Github actions - See https://help.github.com/en/actions/reference/events-that-trigger-workflows#example-using-a-single-event for a comprehensive list:
9+
# # - "push": Triggers each time a commit is pushed
10+
# # - "pull_request": Triggers each time a commit is pushed within a pull request, it makes it much easier to write comments within the PR, but it suffers some strong limitations:
11+
# # - There is no way to trigger when a PR is merged into another - See https://github.community/t/pull-request-action-does-not-run-on-merge/16092?u=vadorequest
12+
# # - It won't trigger when the PR is conflicting with its base branch - See https://github.community/t/run-actions-on-pull-requests-with-merge-conflicts/17104/2?u=vadorequest
13+
# push: # Triggers on each pushed commit
14+
# branches:
15+
# - 'master'
16+
on: [push]
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
# python-version: [ '3.x', 'pypy-3.7', 'pypy-3.8' ]
24+
python-version: ["3.8", "3.9", "3.10"]
25+
name: Python ${{ matrix.python-version }} sample
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Set up Python
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
architecture: x64
33+
cache: 'pip'
34+
- name: Install dependencies
35+
- run: |
36+
python -m pip install --upgrade pip
37+
pip install pylint
38+
- name: Analysing the code with pylint
39+
- run: pylint app.py lambda_app tests

examples/lambda_api/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,41 @@ Service routes map.
3232
* Redis
3333
* Swagger
3434

35+
## Details about requirements files
36+
### requirements.txt
37+
Collection of common application modules, light modules.
38+
39+
### requirements.txt
40+
Collection of specific application modules, heavy modules that can be converted to layers if necessary.
41+
42+
### requirements-tests.txt
43+
Collection of specific test application modules.
44+
3545
## Kong configuration
3646
Configure Kong API Gateway to work compatible with API Gateway.
3747

3848

3949
## Installation
50+
### Installing AWS CLI
51+
Documentation:
52+
https://docs.aws.amazon.com/pt_br/cli/latest/userguide/install-cliv2.html
53+
54+
Execute the follow command:
55+
```
56+
apt install awscli
57+
apt install zip
58+
app install pip
59+
```
60+
Execute the follow command:
61+
```
62+
aws configure
63+
```
64+
65+
### Installing python venv support
66+
Execute the follow command:
67+
```
68+
apt install python38-env
69+
```
4070

4171
### Running Locally
4272
To create the `venv` and install the modules execute:
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
boto3
1+
boto3
2+
pymysql

examples/lambda_api/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Flask
88
pyyaml
99
apispec
1010
marshmallow
11-
pymysql
11+
pylint
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Summary:
2+
# Execute the pylint analysis on code
3+
# Read here for mode info: https://pylint.pycqa.org/en/latest/ and https://www.python.org/dev/peps/pep-0008/
4+
5+
name: Execute the pylint analysis
6+
7+
#on:
8+
# # There are several ways to trigger Github actions - See https://help.github.com/en/actions/reference/events-that-trigger-workflows#example-using-a-single-event for a comprehensive list:
9+
# # - "push": Triggers each time a commit is pushed
10+
# # - "pull_request": Triggers each time a commit is pushed within a pull request, it makes it much easier to write comments within the PR, but it suffers some strong limitations:
11+
# # - There is no way to trigger when a PR is merged into another - See https://github.community/t/pull-request-action-does-not-run-on-merge/16092?u=vadorequest
12+
# # - It won't trigger when the PR is conflicting with its base branch - See https://github.community/t/run-actions-on-pull-requests-with-merge-conflicts/17104/2?u=vadorequest
13+
# push: # Triggers on each pushed commit
14+
# branches:
15+
# - 'master'
16+
on: [push]
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
# python-version: [ '3.x', 'pypy-3.7', 'pypy-3.8' ]
24+
python-version: ["3.8", "3.9", "3.10"]
25+
name: Python ${{ matrix.python-version }} sample
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Set up Python
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
architecture: x64
33+
cache: 'pip'
34+
- name: Install dependencies
35+
- run: |
36+
python -m pip install --upgrade pip
37+
pip install pylint
38+
- name: Analysing the code with pylint
39+
- run: pylint app.py lambda_app tests

examples/lambda_sqs/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ There are no routes for this project.
3030
* MySQL
3131
* Redis
3232

33+
## Details about requirements files
34+
### requirements.txt
35+
Collection of common application modules, light modules.
36+
37+
### requirements.txt
38+
Collection of specific application modules, heavy modules that can be converted to layers if necessary.
39+
40+
### requirements-tests.txt
41+
Collection of specific test application modules.
42+
43+
3344
## Installation
3445

3546
### Installing AWS CLI
@@ -46,6 +57,11 @@ Execute the follow command:
4657
```
4758
aws configure
4859
```
60+
### Installing python venv support
61+
Execute the follow command:
62+
```
63+
apt install python38-env
64+
```
4965

5066
### Creating network
5167
Execute the follow command:

examples/lambda_sqs/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ flask-cors
77
Flask
88
pyyaml
99
apispec
10-
marshmallow
10+
marshmallow
11+
pylint

0 commit comments

Comments
 (0)