-
Notifications
You must be signed in to change notification settings - Fork 5
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 #4 from fga-eps-mds/develop
Release 1
- Loading branch information
Showing
35 changed files
with
863 additions
and
0 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,30 @@ | ||
--- | ||
name: Bug report | ||
about: Coloque os detalhes do bug | ||
title: "[BUG] nome da tarefa no verbo infinitivo" | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Descrição do bug** | ||
<!--Uma descrição clara e concisa do que é o bug.--> | ||
|
||
**Para reproduzir o bug** | ||
<!--Etapas para reproduzir o comportamento: | ||
1. Vá para '...' | ||
2. Clique em '....' | ||
3. Role para baixo até '....' | ||
4. Ver erro--> | ||
|
||
**Comportamento esperado** | ||
<!--Uma descrição clara e concisa do que você esperava que acontecesse.--> | ||
|
||
**Tarefas** | ||
<!--- [] Descrever a tarefa para a issue--> | ||
|
||
**Screenshots** | ||
<!--Se aplicável, adicione capturas de tela para ajudar a explicar seu problema.--> | ||
|
||
**Adicional** | ||
<!--Adicione qualquer outro contexto sobre o problema aqui.--> |
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,21 @@ | ||
--- | ||
name: Feature request | ||
about: Coloque os detalhes da issue | ||
title: '[Doc] ou [Feature] e o nome da tarefa no verbo infinitivo' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Descreva sua issue** | ||
<!--Uma descrição clara e concisa do que você quer que aconteça.--> | ||
|
||
**Tarefas** | ||
<!--- [] Descrever a tarefa para a issue --> | ||
|
||
**Critérios de Aceitação** | ||
<!--Seção para os critérios que definem acerca da aceitação da tarefa. --> | ||
<!--- [ ] Descrever o critério de aceitação --> | ||
|
||
**Contexto adicional** | ||
<!--Adicione qualquer outro contexto ou captura de tela sobre a solicitação de recurso aqui. --> |
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,26 @@ | ||
<!--- Forneça um resumo geral das suas alterações no título acima --> | ||
|
||
## Descrição | ||
<!--- Decreva suas alterações detalhadamente --> | ||
|
||
## _Issue_ Relacionada | ||
<!--- Este projeto apenas aceita _pull requests_ relacionadas à _issues_ abertas. --> | ||
<!--- Se está sugerindo uma nova _feature_ ou mudança, por favor discuta em uma _issue_ antes. --> | ||
<!--- Se está corrigindo um _bug_, deve haver uma _issue_ descrevendo-o com passos para reproduzir. --> | ||
<!--- Por favor, adicione o link para a _issue_ aqui: --> | ||
<!--- #nome_da_issue: --> | ||
|
||
|
||
## Como Isso Foi Testado? | ||
<!--- Por favor, descreva detalhadamente como você testou suas mudanças. --> | ||
<!--- Inclua detalhes do seu ambiente de teste e os testes que você executou --> | ||
<!--- para ver como a sua alteração afeta outras áreas do código, etc. --> | ||
|
||
## Capturas de Tela (se apropriado): | ||
|
||
## Tipos de Mudanças | ||
<!--- Quais os tipos de alterações introduzidos pelo seu código? Coloque um `x` em todas as caixas que se aplicam: --> | ||
- [ ] _Bug fix_ (alteração que corrige uma _issue_ e não altera funcionalidades já existentes); | ||
- [ ] Nova _feature_ (alteração que adiciona uma funcionalidade e não altera funcionalidades já existentes); | ||
- [ ] Alteração disruptiva (_Breaking change_) (Correção ou funcionalidade que causa alteração nas funcionalidades existentes); | ||
- [ ] Documentação. |
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,24 @@ | ||
--- | ||
name: User Stories | ||
about: Coloque os detalhes da US | ||
title: 'USX' | ||
labels: ux | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Descrição da Issue** | ||
<!-- Descreva de forma sucinta a issue e caso necessite, as informações adicionais necessárias para sua realização. --> | ||
|
||
**Tarefas** | ||
<!-- - [ ] Tarefa 1 | ||
- [ ] Tarefa 2 | ||
- [ ] Tarefa 3 --> | ||
|
||
**Protótipo** | ||
<!-- Adicionar link --> | ||
|
||
**Critérios de Aceitação** | ||
<!-- - [ ] Critério 1 | ||
- [ ] Critério 2 | ||
- [ ] Critério 3 --> |
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,57 @@ | ||
name: Análise de Código | ||
on: push | ||
|
||
jobs: | ||
sonarcloud: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres:alpine | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Creating env file | ||
run: | | ||
echo "${{ vars.ENV_FILE }}" > .env | ||
- name: Setup virtual environment | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
|
||
- name: Executa Pytest | ||
run: PYTHONPATH=src python -m coverage run -m pytest --continue-on-collection-errors --junitxml=./junit.xml | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_HOST: localhost | ||
POSTGRES_DB: postgres | ||
POSTGRES_PORT: 5432 | ||
|
||
- name: Gera arquivos de testes no formato .xml | ||
run: python3 -m coverage xml | ||
|
||
- name: Executa SonarCloud Scan | ||
if: ${{ always() }} | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
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,40 @@ | ||
name: Release | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
types: [ closed ] | ||
|
||
jobs: | ||
release: | ||
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'NOT RELEASE') == false | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Cria arquivo .env | ||
run: | | ||
touch ./scripts/.env | ||
echo TOKEN=${{ secrets.API_TOKEN_GITHUB }} >> ./scripts/.env | ||
echo RELEASE_MAJOR=${{ contains(github.event.pull_request.labels.*.name, 'MAJOR RELEASE') }} >> ./scripts/.env | ||
echo RELEASE_MINOR=${{ contains(github.event.pull_request.labels.*.name, 'MINOR RELEASE') }} >> ./scripts/.env | ||
echo RELEASE_FIX=${{ contains(github.event.pull_request.labels.*.name, 'FIX RELEASE') }} >> ./scripts/.env | ||
echo DEVELOP=${{ contains(github.event.pull_request.labels.*.name, 'DEVELOP') }} >> ./scripts/.env | ||
- name: Gera release e envia métricas para repositório de DOC | ||
run: | | ||
cd scripts && yarn install && node release.js | ||
git config --global user.email "${{secrets.GIT_USER_EMAIL}}" | ||
git config --global user.name "${{secrets.GIT_USER_NAME}}" | ||
git clone --single-branch --branch main "https://x-access-token:${{secrets.API_TOKEN_GITHUB}}@github.com/fga-eps-mds/${{secrets.GIT_DOC_REPO}}" ${{secrets.GIT_DOC_REPO}} | ||
mkdir -p ${{secrets.GIT_DOC_REPO}}/analytics-raw-data | ||
cp -R analytics-raw-data/*.json ${{secrets.GIT_DOC_REPO}}/analytics-raw-data | ||
cd ${{secrets.GIT_DOC_REPO}} | ||
git add . | ||
git commit -m "Adicionando métricas do repositório ${{ github.event.repository.name }} ${{ github.ref_name }}" | ||
git push |
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
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,16 @@ | ||
FROM python:3.10.9-slim-buster | ||
|
||
WORKDIR /app | ||
|
||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONBUFFERED 1 | ||
|
||
COPY requirements.txt /app/requirements.txt | ||
|
||
RUN pip3 install --no-cache-dir -r /app/requirements.txt | ||
|
||
COPY . /app/ | ||
|
||
WORKDIR src | ||
|
||
CMD [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8001", "--reload"] |
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 @@ | ||
web: python src/main.py ${PORT} |
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,49 @@ | ||
services: | ||
app: | ||
build: . | ||
ports: | ||
- 8001:8001 | ||
volumes: | ||
- .:/app/ | ||
env_file: | ||
- ./.env | ||
environment: | ||
- POSTGRES_HOST=db | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
restart: always | ||
networks: | ||
- backend_videos | ||
|
||
db: | ||
image: postgres | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data/ | ||
expose: | ||
- 5432 | ||
environment: | ||
- POSTGRES_HOST=${POSTGRES_HOST} | ||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
- POSTGRES_USER=${POSTGRES_USER} | ||
- POSTGRES_DB=${POSTGRES_DB} | ||
env_file: | ||
- ./.env | ||
restart: always | ||
networks: | ||
- backend_videos | ||
healthcheck: | ||
test: | ||
[ | ||
"CMD-SHELL", | ||
"pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}", | ||
] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
volumes: | ||
postgres_data: | ||
|
||
networks: | ||
backend_videos: |
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,5 @@ | ||
POSTGRES_USER= | ||
POSTGRES_PASSWORD= | ||
POSTGRES_HOST= | ||
POSTGRES_DB= | ||
POSTGRES_PORT= |
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,78 @@ | ||
aiosmtplib==2.0.2 | ||
annotated-types==0.6.0 | ||
anyio==3.7.1 | ||
beautifulsoup4==4.12.2 | ||
bs4==0.0.1 | ||
astroid==3.0.1 | ||
bcrypt==4.0.1 | ||
blinker==1.6.3 | ||
certifi==2023.7.22 | ||
cffi==1.16.0 | ||
charset-normalizer==3.3.2 | ||
click==8.1.7 | ||
coverage==7.3.2 | ||
cryptography==41.0.4 | ||
DateTime==5.2 | ||
deprecation==2.1.0 | ||
dill==0.3.7 | ||
dnspython==2.4.2 | ||
docker==6.1.3 | ||
ecdsa==0.18.0 | ||
email-validator==2.0.0.post2 | ||
fastapi==0.104.0 | ||
fastapi-filter==1.0.0 | ||
fastapi-mail==1.4.1 | ||
fastapi-sso==0.7.2 | ||
greenlet==3.0.0 | ||
h11==0.14.0 | ||
httpcore==0.18.0 | ||
httptools==0.6.1 | ||
httpx==0.25.0 | ||
idna==3.4 | ||
iniconfig==2.0.0 | ||
isort==5.12.0 | ||
Jinja2==3.1.2 | ||
MarkupSafe==2.1.3 | ||
mccabe==0.7.0 | ||
oauthlib==3.2.2 | ||
packaging==23.2 | ||
passlib==1.7.4 | ||
platformdirs==3.11.0 | ||
pluggy==1.3.0 | ||
psycopg2-binary==2.9.9 | ||
pyasn1==0.5.0 | ||
pycparser==2.21 | ||
pydantic==2.4.2 | ||
pydantic-settings==2.0.3 | ||
pydantic_core==2.10.1 | ||
pylint==3.0.2 | ||
PyMySQL==1.1.0 | ||
pytest==7.4.2 | ||
pytest-asyncio==0.21.1 | ||
pytest-html==4.1.1 | ||
pytest-metadata==3.0.0 | ||
pytest-mock==3.12.0 | ||
python-dotenv==1.0.0 | ||
python-jose==3.3.0 | ||
python-multipart==0.0.6 | ||
pytz==2023.3.post1 | ||
PyYAML==6.0.1 | ||
requests==2.31.0 | ||
rsa==4.9 | ||
six==1.16.0 | ||
sniffio==1.3.0 | ||
soupsieve==2.5 | ||
SQLAlchemy==2.0.22 | ||
starlette==0.27.0 | ||
testcontainers==3.7.1 | ||
tomlkit==0.12.2 | ||
typing_extensions==4.8.0 | ||
ujson==5.8.0 | ||
Unidecode==1.3.7 | ||
urllib3==2.1.0 | ||
uvicorn==0.23.2 | ||
watchfiles==0.21.0 | ||
websocket-client==1.6.4 | ||
websockets==11.0.3 | ||
wrapt==1.15.0 | ||
zope.interface==6.1 |
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 @@ | ||
python-3.10.12 |
Oops, something went wrong.