Skip to content

Commit a4cffac

Browse files
Merge pull request #2 from Kalgoc/ci/cd
Finished CI
2 parents 3de5781 + b1688c7 commit a4cffac

15 files changed

+159
-33
lines changed

.DS_Store

-6 KB
Binary file not shown.

.coveragerc

-21
This file was deleted.

.flake8

-5
This file was deleted.

.github/pull_request_template.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## ¿Qué se hizo?
2+
3+
[Escribir acá que es lo que incluye esta PR]
4+
5+
## Comentarios Adicionales
6+
7+
[Escribir acá cualquier comentario adicional, por ejemplo, puntos a considerar o solicitudes de feedback]

.github/reviewers.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Set to true to add reviewers to pull requests
2+
addReviewers: true
3+
4+
# Set to true to add assignees to pull requests
5+
addAssignees: author
6+
7+
# A list of reviewers to be added to pull requests (GitHub user name)
8+
reviewers:
9+
- DaHunterTime
10+
- sofiagiagnoni
11+
- anibalcontreras
12+
- ebenstom
13+
14+
numberOfReviewers: 1

.github/workflows/black.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: black
2+
3+
on:
4+
push:
5+
branches: [ "main", "develop" ]
6+
7+
pull_request:
8+
branches: [ "main", "develop" ]
9+
10+
jobs:
11+
lint:
12+
name: "black formatter"
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: psf/black@stable

.github/workflows/flake8.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: flake8
2+
3+
on:
4+
push:
5+
branches: [ "main", "develop" ]
6+
7+
pull_request:
8+
branches: [ "main", "develop" ]
9+
10+
jobs:
11+
flake8-lint:
12+
runs-on: ubuntu-latest
13+
name: Lint
14+
steps:
15+
- name: Check out source repository
16+
uses: actions/checkout@v3
17+
- name: Set up Python environment
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.11"
21+
- name: flake8 Lint
22+
uses: py-actions/flake8@v2
23+
with:
24+
plugins: "flake8-pyproject"

.github/workflows/pytest.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: pytest
2+
3+
on:
4+
push:
5+
branches: [ "main", "develop" ]
6+
7+
pull_request:
8+
branches: [ "main", "develop" ]
9+
10+
jobs:
11+
build:
12+
name: Run tests
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ["3.11"]
17+
18+
steps:
19+
- uses: szenius/set-timezone@v1.2
20+
with:
21+
timezoneLinux: "America/Santiago"
22+
- uses: actions/checkout@v3
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install pytest pytest-md pytest-emoji
31+
pip install pipenv
32+
pipenv install --system --dev
33+
- uses: pavelzw/pytest-action@v2
34+
with:
35+
emoji: false

.github/workflows/reviews.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "Pull Request Assigner"
2+
3+
on:
4+
pull_request:
5+
types: [ opened, ready_for_review ]
6+
7+
jobs:
8+
add-reviewers:
9+
runs-on: ubuntu-latest
10+
permissions: write-all
11+
12+
steps:
13+
- uses: examedi/pull-request-assigner@v0.1.2
14+
with:
15+
configuration-path: ".github/reviewers.yml"

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,6 @@ cython_debug/
158158
# and can be added to the global gitignore or merged into this file. For a more nuclear
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160
#.idea/
161+
162+
# Misc
163+
.DS_Store

.pre-commit-config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ repos:
1616
rev: 5.0.4
1717
hooks:
1818
- id: flake8
19+
additional_dependencies: [Flake8-pyproject]

Pipfile

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ isort = "*"
1717
pre-commit = "*"
1818
coverage = "*"
1919
pytest-cov = "*"
20+
flake8-pyproject = "*"
2021

2122
[requires]
2223
python_version = "3.11"

Pipfile.lock

+12-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Black
2+
[tool.black]
3+
line-length = 120
4+
target-version = ["py311"]
5+
include = "\\.pyi?$"
6+
7+
# Isort
8+
[tool.isort]
9+
profile = "black"
10+
11+
# Flake8
12+
[tool.flake8]
13+
exclude = [".git", "__pycache__", "old", "build", "dist", "venv"]
14+
ignore = ["E226", "E302", "E41", "F401", "F403", "F405"]
15+
max-line-length = 120
16+
max-complexity = 10
17+
18+
# Pytest
19+
[tool.pytest.ini_options]
20+
DJANGO_SETTINGS_MODULE = "piggywallet.settings.test"
21+
python_files = ["tests.py", "test_*.py", "*_tests.py"]
22+
23+
# Coverage
24+
[tool.coverage.run]
25+
source = ["piggywallet", "playground"]
26+
omit = ["*/__init__.py", "*/settings/*", "*/migrations/*", "*/wsgi.py", "*/asgi.py", "*/urls.py"]
27+
28+
[tool.coverage.report]
29+
omit = ["*/__init__.py", "*/settings/*", "*/migrations/*", "*/wsgi.py", "*/asgi.py", "*/urls.py"]

pytest.ini

-3
This file was deleted.

0 commit comments

Comments
 (0)