-
Notifications
You must be signed in to change notification settings - Fork 1
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 #209 from ResidenciaTICBrisa/testes
(#185) Adição de testes unitários para todas as fontes de dados
- Loading branch information
Showing
287 changed files
with
11,819 additions
and
1,277 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,2 @@ | ||
[run] | ||
omit = scripts/tests/*,scripts/epe_matriz.py,*/__init__.py,scripts/main.py,scripts/handlers/benHandler.py,scripts/handlers/pneHandler.py |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name: run main.py | ||
|
||
on: | ||
schedule: [{cron: "0 19 * * 3"}] #agendamento | ||
schedule: [{cron: "0 0 * * 5-6"}] #agendamento | ||
|
||
jobs: | ||
build: | ||
|
@@ -19,8 +19,9 @@ jobs: | |
pip install pandas==2.0.2 | ||
pip install bs4==0.0.1 | ||
pip install openpyxl==3.1.2 | ||
pip install requests_html==0.10.0 | ||
- name: execute py script # run main.py | ||
run: python 04_PipelineTCU/scripts/main.py | ||
run: python scripts/main.py | ||
- name: commit files | ||
run: | | ||
git config --local user.email "[email protected]" | ||
|
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,25 @@ | ||
name: Python Linter | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
pip install pylint | ||
- name: Lint flake8 | ||
run: | | ||
flake8 scripts --ignore=E203,W291,W293 --max-line-length=240 --show-source --statistics | ||
find . -type f -name "*.py" -exec pylint --disable=C0103,C0301,C0114,W0703,W0622,R0913,E1101,R0903,R0915,R0912,W0612,E0401,R0914 -j 0 --exit-zero {} \; |
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,29 @@ | ||
name: teste-unitario-automatizado | ||
|
||
on: # Quando o usuário realizar um push, será feito os testes | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install --upgrade pip | ||
pip install requests==2.31.0 | ||
pip install pandas==2.0.2 | ||
pip install bs4==0.0.1 | ||
pip install openpyxl==3.1.2 | ||
pip install requests_html==0.10.0 | ||
- name: Test with pytest | ||
run: | # Vai realizar os testes | ||
pip install pytest | ||
pip install pytest-cov | ||
pytest --cov-config=.coveragerc --cov=scripts |
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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
env* | ||
venv* | ||
04_PipelineTCU/__pycache__ | ||
scripts/__pycache__ | ||
scripts/scrappers/__pycache__ | ||
scripts/handlers/__pycache__ | ||
scripts/tests/__pycache__ | ||
.coverage | ||
.pytest_cache |
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.