Skip to content

Commit 7ca43b8

Browse files
Atualização
1 parent 7a85267 commit 7ca43b8

File tree

579 files changed

+30751
-30605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

579 files changed

+30751
-30605
lines changed

.env

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
SECRET_KEY="django-insecure-#-!&%"
2-
DEBUG=true
3-
POSTGRES_PASSWORD="postgres"
4-
POSTGRES_USER="postgres"
5-
POSTGRES_DB="postgres"
6-
ENVIRONMENT=test
7-
DJANGO_SETTINGS_MODULE=testproject.settings
1+
SECRET_KEY="django-insecure-#-!&%"
2+
DEBUG=true
3+
POSTGRES_PASSWORD="postgres"
4+
POSTGRES_USER="postgres"
5+
POSTGRES_DB="postgres"
6+
ENVIRONMENT=test
7+
DJANGO_SETTINGS_MODULE=testproject.settings

.flake8

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
[flake8]
2-
ignore = E203, E231, E266, E402, E501, F405, W503
3-
max-complexity = 18
4-
select = B,C,E,F,W,T4,B9
5-
exclude =
6-
__pycache__
1+
[flake8]
2+
ignore = E203, E231, E266, E402, E501, F405, W503
3+
max-complexity = 18
4+
select = B,C,E,F,W,T4,B9
5+
exclude =
6+
__pycache__
77
venv

.github/workflows/github-actions.yml

+66-66
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
1-
name: GitHub Actions
2-
run-name: ${{ github.actor }} is checking ${{ github.ref }} branch 🚀
3-
on: [push, workflow_dispatch]
4-
jobs:
5-
baseapp-auth-baseapp_auth:
6-
uses: ./.github/workflows/project-workflow.yml
7-
with:
8-
project: baseapp-auth
9-
custom_pytest: "pytest --ds=testproject.settings_referrals -m referrals baseapp-auth/baseapp_auth/tests"
10-
baseapp-auth-baseapp_referrals:
11-
uses: ./.github/workflows/project-workflow.yml
12-
with:
13-
project: baseapp-auth
14-
app_name: baseapp_referrals
15-
baseapp-cloudflare-stream-field:
16-
uses: ./.github/workflows/project-workflow.yml
17-
with:
18-
project: baseapp-cloudflare-stream-field
19-
baseapp-core:
20-
uses: ./.github/workflows/project-workflow.yml
21-
with:
22-
project: baseapp-core
23-
baseapp-drf-view-action-permissions:
24-
uses: ./.github/workflows/project-workflow.yml
25-
with:
26-
project: baseapp-drf-view-action-permissions
27-
baseapp-message-templates:
28-
uses: ./.github/workflows/project-workflow.yml
29-
with:
30-
project: baseapp-message-templates
31-
baseapp-payments:
32-
uses: ./.github/workflows/project-workflow.yml
33-
with:
34-
project: baseapp-payments
35-
# baseapp-reactions:
36-
# uses: ./.github/workflows/project-workflow.yml
37-
# with:
38-
# project: baseapp-reactions
39-
baseapp-social-auth:
40-
uses: ./.github/workflows/project-workflow.yml
41-
with:
42-
project: baseapp-social-auth
43-
baseapp-e2e:
44-
uses: ./.github/workflows/project-workflow.yml
45-
with:
46-
project: baseapp-e2e
47-
baseapp-notifications:
48-
uses: ./.github/workflows/project-workflow.yml
49-
with:
50-
project: baseapp-notifications
51-
baseapp-url-shortening:
52-
uses: ./.github/workflows/project-workflow.yml
53-
with:
54-
project: baseapp-url-shortening
55-
baseapp-follows:
56-
uses: ./.github/workflows/project-workflow.yml
57-
with:
58-
project: baseapp-follows
59-
baseapp-pages:
60-
uses: ./.github/workflows/project-workflow.yml
61-
with:
62-
project: baseapp-pages
63-
baseapp-comments:
64-
uses: ./.github/workflows/project-workflow.yml
65-
with:
66-
project: baseapp-comments
1+
name: GitHub Actions
2+
run-name: ${{ github.actor }} is checking ${{ github.ref }} branch 🚀
3+
on: [push, workflow_dispatch]
4+
jobs:
5+
baseapp-auth-baseapp_auth:
6+
uses: ./.github/workflows/project-workflow.yml
7+
with:
8+
project: baseapp-auth
9+
custom_pytest: "pytest --ds=testproject.settings_referrals -m referrals baseapp-auth/baseapp_auth/tests"
10+
baseapp-auth-baseapp_referrals:
11+
uses: ./.github/workflows/project-workflow.yml
12+
with:
13+
project: baseapp-auth
14+
app_name: baseapp_referrals
15+
baseapp-cloudflare-stream-field:
16+
uses: ./.github/workflows/project-workflow.yml
17+
with:
18+
project: baseapp-cloudflare-stream-field
19+
baseapp-core:
20+
uses: ./.github/workflows/project-workflow.yml
21+
with:
22+
project: baseapp-core
23+
baseapp-drf-view-action-permissions:
24+
uses: ./.github/workflows/project-workflow.yml
25+
with:
26+
project: baseapp-drf-view-action-permissions
27+
baseapp-message-templates:
28+
uses: ./.github/workflows/project-workflow.yml
29+
with:
30+
project: baseapp-message-templates
31+
baseapp-payments:
32+
uses: ./.github/workflows/project-workflow.yml
33+
with:
34+
project: baseapp-payments
35+
# baseapp-reactions:
36+
# uses: ./.github/workflows/project-workflow.yml
37+
# with:
38+
# project: baseapp-reactions
39+
baseapp-social-auth:
40+
uses: ./.github/workflows/project-workflow.yml
41+
with:
42+
project: baseapp-social-auth
43+
baseapp-e2e:
44+
uses: ./.github/workflows/project-workflow.yml
45+
with:
46+
project: baseapp-e2e
47+
baseapp-notifications:
48+
uses: ./.github/workflows/project-workflow.yml
49+
with:
50+
project: baseapp-notifications
51+
baseapp-url-shortening:
52+
uses: ./.github/workflows/project-workflow.yml
53+
with:
54+
project: baseapp-url-shortening
55+
baseapp-follows:
56+
uses: ./.github/workflows/project-workflow.yml
57+
with:
58+
project: baseapp-follows
59+
baseapp-pages:
60+
uses: ./.github/workflows/project-workflow.yml
61+
with:
62+
project: baseapp-pages
63+
baseapp-comments:
64+
uses: ./.github/workflows/project-workflow.yml
65+
with:
66+
project: baseapp-comments
+74-74
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
1-
name: Project Workflow
2-
3-
on:
4-
workflow_call:
5-
inputs:
6-
project:
7-
required: true
8-
type: string
9-
app_name:
10-
required: false
11-
type: string
12-
custom_pytest:
13-
required: false
14-
type: string
15-
16-
jobs:
17-
project-workflow:
18-
runs-on: ubuntu-latest
19-
strategy:
20-
matrix:
21-
python-version: ["3.12"]
22-
django-version: ["4.2", "5.0"]
23-
steps:
24-
- uses: actions/checkout@v4
25-
26-
- name: docker compose build
27-
run: docker compose build --build-arg "PYTHON_VERSION=${{ matrix.python-version }}"
28-
29-
- name: docker compose up
30-
run: docker compose up -d --wait
31-
32-
- name: install requirements
33-
run: docker compose exec backend pip install -r ${{ inputs.project }}/testproject/requirements.txt
34-
35-
- name: flake8
36-
id: flake8
37-
run: docker compose exec backend flake8 ./${{ inputs.project }} --show-source --statistics --count
38-
39-
- name: isort
40-
id: isort
41-
if: steps.flake8.outcome == 'success'
42-
run: docker compose exec backend isort --check ./${{ inputs.project }}
43-
44-
- name: black
45-
id: black
46-
if: steps.isort.outcome == 'success'
47-
run: docker compose exec backend black --check ./${{ inputs.project }}
48-
49-
- name: Install tests requirements with Django ${{ matrix.django-version }}
50-
if: steps.black.outcome == 'success'
51-
id: requirements_installation
52-
run: |
53-
docker compose exec backend pip install -r ${{ inputs.project }}/testproject/requirements.txt
54-
# Override Django version
55-
docker compose exec backend pip install "Django~=${{ matrix.django-version }}"
56-
57-
- name: pytest
58-
if: steps.requirements_installation.outcome == 'success'
59-
run: |
60-
app_name=$(echo "${{ inputs.project }}" | tr '-' '_')
61-
if [ "${{ inputs.app_name }}" ]
62-
then app_name="${{ inputs.app_name }}"
63-
else
64-
app_name=$(echo "${{ inputs.project }}" | tr '-' '_')
65-
fi
66-
tests_path="${{ inputs.project }}/${app_name}/tests"
67-
docker compose exec backend pytest ${tests_path}
68-
echo "Running custom pytest command"
69-
if [ "${{ inputs.custom_pytest }}" ]
70-
then eval "docker compose exec backend ${{ inputs.custom_pytest }}"
71-
fi
72-
73-
- name: docker compose down
74-
run: docker compose down --volumes --remove-orphans
1+
name: Project Workflow
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
project:
7+
required: true
8+
type: string
9+
app_name:
10+
required: false
11+
type: string
12+
custom_pytest:
13+
required: false
14+
type: string
15+
16+
jobs:
17+
project-workflow:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
python-version: ["3.12"]
22+
django-version: ["4.2", "5.0"]
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: docker compose build
27+
run: docker compose build --build-arg "PYTHON_VERSION=${{ matrix.python-version }}"
28+
29+
- name: docker compose up
30+
run: docker compose up -d --wait
31+
32+
- name: install requirements
33+
run: docker compose exec backend pip install -r ${{ inputs.project }}/testproject/requirements.txt
34+
35+
- name: flake8
36+
id: flake8
37+
run: docker compose exec backend flake8 ./${{ inputs.project }} --show-source --statistics --count
38+
39+
- name: isort
40+
id: isort
41+
if: steps.flake8.outcome == 'success'
42+
run: docker compose exec backend isort --check ./${{ inputs.project }}
43+
44+
- name: black
45+
id: black
46+
if: steps.isort.outcome == 'success'
47+
run: docker compose exec backend black --check ./${{ inputs.project }}
48+
49+
- name: Install tests requirements with Django ${{ matrix.django-version }}
50+
if: steps.black.outcome == 'success'
51+
id: requirements_installation
52+
run: |
53+
docker compose exec backend pip install -r ${{ inputs.project }}/testproject/requirements.txt
54+
# Override Django version
55+
docker compose exec backend pip install "Django~=${{ matrix.django-version }}"
56+
57+
- name: pytest
58+
if: steps.requirements_installation.outcome == 'success'
59+
run: |
60+
app_name=$(echo "${{ inputs.project }}" | tr '-' '_')
61+
if [ "${{ inputs.app_name }}" ]
62+
then app_name="${{ inputs.app_name }}"
63+
else
64+
app_name=$(echo "${{ inputs.project }}" | tr '-' '_')
65+
fi
66+
tests_path="${{ inputs.project }}/${app_name}/tests"
67+
docker compose exec backend pytest ${tests_path}
68+
echo "Running custom pytest command"
69+
if [ "${{ inputs.custom_pytest }}" ]
70+
then eval "docker compose exec backend ${{ inputs.custom_pytest }}"
71+
fi
72+
73+
- name: docker compose down
74+
run: docker compose down --volumes --remove-orphans

0 commit comments

Comments
 (0)