Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: gerenciar solicitações de ação #51

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
adf7433
Generalizando endereco de smtp
thiagohdaqw Sep 17, 2023
38503f0
Added entity framework
thiagohdaqw Sep 21, 2023
da53ba2
Added entity UnidadeFederativa
thiagohdaqw Sep 21, 2023
f032909
Added entity EtapaEnsino
thiagohdaqw Sep 21, 2023
be82313
Added entity Municipio
thiagohdaqw Sep 21, 2023
7264bad
Added entity Situacao
thiagohdaqw Sep 21, 2023
dbe11e1
Added entity Rede
thiagohdaqw Sep 21, 2023
1b6e0c9
Added entity Porte
thiagohdaqw Sep 21, 2023
c7756d0
Added entity Localizacao
thiagohdaqw Sep 21, 2023
bdf125f
Added entity Escola
thiagohdaqw Sep 21, 2023
838df08
Added entity EscolaEtapaEnsino
thiagohdaqw Sep 21, 2023
9999c53
Transformed entities in enums
thiagohdaqw Sep 21, 2023
5f79506
Merge pull request #1 from fga-eps-mds/deploy
thiagohdaqw Sep 21, 2023
845e6a8
Added municipio seeding
thiagohdaqw Sep 22, 2023
460e005
Fixed escola optional fields
thiagohdaqw Sep 22, 2023
3648c72
Converted create escolas with csv
thiagohdaqw Sep 22, 2023
e7d3539
Dockerfile modificado para ambiente de dev
wagnermc506 Sep 27, 2023
d8290bb
Adicionando api error handler
thiagohdaqw Sep 30, 2023
0d90042
Refatorando cadastro de escola
thiagohdaqw Sep 30, 2023
0a01e4a
Refatorando delecao de escola
thiagohdaqw Sep 30, 2023
e93b2d2
Refatorando pesquisa paginada de escola
thiagohdaqw Sep 30, 2023
8064373
Refatorando alteracao de dados da escola
thiagohdaqw Sep 30, 2023
5a66615
Refatorando dominio para o entity framework
thiagohdaqw Sep 30, 2023
a109ea1
Organizando pastas do projeto
thiagohdaqw Sep 30, 2023
40db5ae
Arrumando alteracao da etapa de ensino
thiagohdaqw Sep 30, 2023
51201b3
Arrumando referencias
thiagohdaqw Sep 30, 2023
e19d785
Melhorando performance no seeding de municipio
thiagohdaqw Oct 6, 2023
3e819a4
test: adiciona testes do municipio repositorio
thiagohdaqw Oct 7, 2023
92a539a
Fix: arruma colisao entre do banco com testes paralelos
thiagohdaqw Oct 7, 2023
436d0e5
test: adiciona testes do repositorio de escolas
thiagohdaqw Oct 7, 2023
5b9389c
test: evita acesso recorrente ao arquivo de municipios
thiagohdaqw Oct 7, 2023
76b1f49
Test: adiciona testes do dominio controller
thiagohdaqw Oct 7, 2023
e52cb64
fix: arruma testes do dominio e solicitacao
thiagohdaqw Oct 7, 2023
620f7a5
Update build.yml
thiagohdaqw Oct 9, 2023
5d2d140
Merge pull request #2 from fga-eps-mds/docker-environment
thiagohdaqw Oct 11, 2023
299607e
Update build.yml
thiagohdaqw Oct 11, 2023
a66ace9
chore: Atualiza repositórios no workflow de release
wagnermc506 Oct 14, 2023
641c21c
test: adiciona testes do EscolaService com entity framework
thiagohdaqw Oct 15, 2023
fb7a9fa
feat: adiciona coverage no gitignore
thiagohdaqw Oct 15, 2023
f0979a6
Merge remote-tracking branch 'origin/develop' into add-entity-framework
thiagohdaqw Oct 15, 2023
78f8887
test: adiciona escola controller tests
thiagohdaqw Oct 15, 2023
cebb947
Merge pull request #5 from fga-eps-mds/release_workflow
thiagohdaqw Oct 16, 2023
d13d177
fix: remove alteracoes desnecessarias
thiagohdaqw Oct 16, 2023
d92aac7
fix: arruma qualidade do codigo
thiagohdaqw Oct 16, 2023
b844617
hotfix: arruma formato do release.yml
thiagohdaqw Oct 16, 2023
4c47cd0
fix: remove mal cheiros de código
thiagohdaqw Oct 16, 2023
803b8cc
fix: arruma encode dos arquivos de teste
thiagohdaqw Oct 16, 2023
589e461
fix: mal cheiro de código
thiagohdaqw Oct 16, 2023
d6a6f36
feat: adiciona ci pelo ubuntu
thiagohdaqw Oct 17, 2023
514dc33
Merge remote-tracking branch 'origin/develop' into add-entity-framework
thiagohdaqw Oct 17, 2023
b98162c
fix: arruma encoding dos arquivos
thiagohdaqw Oct 17, 2023
0d8effa
feat: adiciona sonar properties
thiagohdaqw Oct 17, 2023
143f95d
chore: melhora eficiencia do ci
thiagohdaqw Oct 17, 2023
1c5099e
fix: arruma exclusoes do sonar
thiagohdaqw Oct 17, 2023
26f3a10
fix: remove code smells
thiagohdaqw Oct 17, 2023
1bd59cb
fix: arruma code smells
thiagohdaqw Oct 17, 2023
ed3c54a
fix: adiciona arquivo main na exclusao do sonar
thiagohdaqw Oct 19, 2023
6dc94bb
feat: adiciona módulo de autenticação
csreis72 Oct 20, 2023
7d3033d
fix: arruma exclusao do sonar
thiagohdaqw Oct 20, 2023
559061d
refactor: utiliza pacote de autenticação
csreis72 Oct 20, 2023
b3a7a54
feat: adiciona permissões de usuário referentes ao serviço de escolas
csreis72 Oct 20, 2023
1349814
fix: arruma docker
thiagohdaqw Oct 21, 2023
9c5c369
Merge pull request #6 from fga-eps-mds/add-entity-framework
thiagohdaqw Oct 21, 2023
af33a4b
Merge branch 'develop' of github.com:fga-eps-mds/2023.2-Dnit-EscolaSe…
csreis72 Oct 21, 2023
4c19101
fix: remove chaves duplicadas no json de configurações
csreis72 Oct 21, 2023
a1ddd7a
refactor: move Permissao para pasta Enums e remove rota de teste
csreis72 Oct 21, 2023
7986abb
fix: atualiza service de autenticacao
thiagohdaqw Oct 21, 2023
f477bcf
test: adiciona testes de permissao
thiagohdaqw Oct 22, 2023
7ae4244
feat: autenticação e autorização
yudi-azvd Oct 23, 2023
8c3b897
Release v1.0.0 (#8)
thiagohdaqw Oct 23, 2023
a3cc31a
devops: adicionando database no docker
thiagohdaqw Nov 7, 2023
d53aeb5
adicionando ef no docker
thiagohdaqw Nov 7, 2023
cf36ca8
feat: adicionando tabela de Ranque
DiceRunner714 Nov 7, 2023
be8e372
feat: adicionando tabela de EscolaRanque
DiceRunner714 Nov 7, 2023
a0b9339
chore: remove .vscode/ do rastreio do Git
yudi-azvd Nov 7, 2023
d4e8c1c
Merge branch 'feat/us4' of github.com:fga-eps-mds/2023.2-Dnit-EscolaS…
yudi-azvd Nov 7, 2023
0c02384
feat: adicionando RanqueController
DiceRunner714 Nov 7, 2023
2e74b61
fix: arrumando volumes
thiagohdaqw Nov 7, 2023
39562ea
fix: arrumando volumes
thiagohdaqw Nov 7, 2023
8a6d1d5
Merge branch 'feat/us4' of github.com:fga-eps-mds/2023.2-Dnit-EscolaS…
yudi-azvd Nov 8, 2023
74a806d
chore: adiciona mais escolas
yudi-azvd Nov 8, 2023
ad4dc84
chore: conecta ao banco por docker e nativamente
yudi-azvd Nov 8, 2023
c49fc48
feat: adicionando classe Superintendencia e o popula dela
joaoseisei Nov 8, 2023
9aff7a4
refactor: reatoradas propiedades de Superintendencia para padrão do p…
Hunter104 Nov 8, 2023
fc39ee6
feat: adicionado campo Id para classe Superintendencia da modelo
Hunter104 Nov 8, 2023
91d8a47
Merge branch 'chore/docker-health-check' into feat/74-Menor-custo-log…
victorhugo21 Nov 8, 2023
7b9bb49
feat: adiciona distância para superintendência como propiedade de escola
Hunter104 Nov 8, 2023
2fe2714
Merge remote-tracking branch 'origin/feat/74-Menor-custo-logístico-pa…
Hunter104 Nov 8, 2023
a478eb8
fix: arruma volume do docker
thiagohdaqw Nov 8, 2023
f59c0e8
feat: removidos required para propiedades opcionais em Superintendenc…
Hunter104 Nov 8, 2023
48bfab5
refactor: modificado nome DistanciaparaSuperintendencia em escola par…
Hunter104 Nov 8, 2023
835a6fa
build: remove caminho relativo em docker-compose.yml
Hunter104 Nov 8, 2023
874e138
refactor: modifica banco de dados devel para específico da US6 em app…
Hunter104 Nov 8, 2023
00ca124
feat: adiciona novas migrações relacionadas as superintendências
Hunter104 Nov 8, 2023
6f2aa65
feat: adiciona csv Superintendencia e seu popula
joaoseisei Nov 8, 2023
af921fd
devops: adicionando scripts para o deploy continuo
thiagohdaqw Nov 9, 2023
b50e63a
devops: adicionando action para deploy continuo
thiagohdaqw Nov 9, 2023
4089689
devops: adicionando informacao de runtime
thiagohdaqw Nov 9, 2023
cc3bc00
devops: deploy continuo apenas na develop
thiagohdaqw Nov 9, 2023
3007201
devops: adiciona gitignore
thiagohdaqw Nov 9, 2023
b0942cf
devops: adiciona connection string do docker separada
thiagohdaqw Nov 9, 2023
9e34d9a
fix: arruma inicializacao na pasta build
thiagohdaqw Nov 9, 2023
e6fb05e
feat: inicia enpoint que causa novo cálculo de ranking pela API de Up…
yudi-azvd Nov 9, 2023
f6e0f04
chore: instala dependências hangfire
yudi-azvd Nov 9, 2023
ba477ea
chore: adiciona coluna UPS em Escola
yudi-azvd Nov 9, 2023
a95deb0
chore: adiciona configurações Hangfire e usa BackgroundJob
yudi-azvd Nov 10, 2023
db1a4c9
chore: coloca CalcularUpsJob como serviço escopado
yudi-azvd Nov 11, 2023
5711d61
Merge pull request #11 from fga-eps-mds/devops/deploy_continuo
thiagohdaqw Nov 12, 2023
a4b0659
Merge pull request #10 from fga-eps-mds/chore/docker-health-check
thiagohdaqw Nov 12, 2023
607a9dd
Merge commit 'f477bcf471537e8a7b9f296a00adfabe732185c0'
thiagohdaqw Nov 12, 2023
4de648f
feat: calcula UPS das outras páginas de escolas
yudi-azvd Nov 12, 2023
3a4526e
feat: limita quantidade de jobs concorrentes em 3
yudi-azvd Nov 13, 2023
aee5929
feat: adicionando listagem de escola ranqueada
thiagohdaqw Nov 13, 2023
286dfb9
refactor: passa apenas ID do novo ranque para o job
yudi-azvd Nov 13, 2023
547628f
chore: atualiza com o remoto
yudi-azvd Nov 13, 2023
d5e2a7d
feat: guarda progresso de bateladas em Ranque
yudi-azvd Nov 13, 2023
b9c6ca3
feat: retorna lista de escolas a partir de ranque calculado
yudi-azvd Nov 13, 2023
3985b7f
feat: adiciona verificação de autorização pra calcular ranque
yudi-azvd Nov 13, 2023
5c13e61
chore: host do ups service é resolvido a partir de ServicesConfig
yudi-azvd Nov 13, 2023
ce9208b
deploy: ordena target numericamente
thiagohdaqw Nov 13, 2023
1d2c222
feat: adiciona timeout e tamanho batelada como parâmetros de query
yudi-azvd Nov 14, 2023
d790dde
refactor: expiração e tamanho de batelada é configurado por ServicesC…
yudi-azvd Nov 14, 2023
b17417c
fix: ajusta chamada de FromMinutes para timeout infinito
yudi-azvd Nov 14, 2023
60e1a59
feat: endpoint de polling para verificar processamento do ranque
yudi-azvd Nov 14, 2023
7f8d48d
chore: rascunho de testes
yudi-azvd Nov 14, 2023
a76e520
feat: adicionado pacote de csvhelper
Hunter104 Nov 14, 2023
9290847
feat: adicionado repositório para gerenciamento de superintendências
Hunter104 Nov 14, 2023
c2c64de
fix: consertadas referências para chaves em dicionário
Hunter104 Nov 15, 2023
0726e80
feat: modificada distância para superintendência em escola para double
Hunter104 Nov 15, 2023
04dcf2d
feat: adicionada propiedade distância em método criar escola em Escol…
Hunter104 Nov 15, 2023
a27994f
feat: adicionado código de erro de superintendência não encontrada
Hunter104 Nov 15, 2023
291bc5d
feat: adicionado método para calcular distância entre dois pontos geo…
Hunter104 Nov 15, 2023
937416f
feat: adicionada funcionalidade de calcular menor distância para supe…
Hunter104 Nov 15, 2023
9ea2136
feat: adicionando csvhelper no populaSuperintendencia
joaoseisei Nov 15, 2023
98654a0
Merge branch 'feat/74-Menor-custo-logístico-para-um-conjunto-de-ações…
joaoseisei Nov 15, 2023
52992a7
feat: endpoint para obter mais detalhes de escola em ranque
yudi-azvd Nov 15, 2023
86b8bf2
chore: adiciona rascunho de teste
yudi-azvd Nov 15, 2023
0b5945a
test: verifica que retorna lista vazia quando não há ranques
yudi-azvd Nov 15, 2023
df4a244
fix: Consertados erros no merge do csvHelper
joaoseisei Nov 15, 2023
99fce2f
fix: Atualizando a latitude para o padrao brasileiro
joaoseisei Nov 15, 2023
ccca3a1
feat: adaptado método de calcular distância para novo formato de coor…
Hunter104 Nov 15, 2023
7d5ec38
feat: adicionada referência a superintendência mais próxima (nullable…
Hunter104 Nov 15, 2023
9f1030b
Revert "feat: adicionada referência a superintendência mais próxima (…
Hunter104 Nov 15, 2023
a4df58e
feat: adicionada referência nullable à superintendência mais próxima
Hunter104 Nov 15, 2023
1063a0a
feat: adicionado overload de Criar escola com superintendência mais p…
Hunter104 Nov 15, 2023
4b67432
feat: adicionada referência superintendência mais próxima ao cadastra…
Hunter104 Nov 15, 2023
aee1ed9
feat: adiciona referência a superintendência mais próxima à escola
Hunter104 Nov 15, 2023
f08016b
feat: adicionado overloading de criar escola com superintendencia mai…
Hunter104 Nov 15, 2023
3056b16
feat: adicionada superintendencia mais próxima como parâmetro em Cria…
Hunter104 Nov 15, 2023
67a9802
fix: Removendo o cep do endereço das superintendencias
joaoseisei Nov 15, 2023
e58f58b
feat: retorna uf no ranque de escola
thiagohdaqw Nov 16, 2023
0a56a45
feat: salva posicao do ranqueamento
thiagohdaqw Nov 16, 2023
2c23c21
fix: arruma metodo assincrono sem async
thiagohdaqw Nov 16, 2023
aa882cd
feat: adiciona posicao na tabela de ranking
thiagohdaqw Nov 16, 2023
3cecf59
test: job é chamado pelo número de páginas de escolas
yudi-azvd Nov 16, 2023
fe78b75
chore: atualiza com remoto
yudi-azvd Nov 16, 2023
3be0598
Merge branch 'develop' into feat/us4
yudi-azvd Nov 16, 2023
c4e1082
fix: usa coluna de posição
yudi-azvd Nov 16, 2023
f6e1d52
refactor: move criação de ranque para função
yudi-azvd Nov 16, 2023
0e60927
test: calcular ups job
yudi-azvd Nov 16, 2023
2f72347
test: finalizar calcular ups job
yudi-azvd Nov 16, 2023
eb0e957
test: mais teste serviço de ranque
yudi-azvd Nov 16, 2023
9f93bb8
feat: adicionado overload de Criar escola com superintendência mais p…
Hunter104 Nov 15, 2023
ae236d9
feat: adicionada referência superintendência mais próxima ao cadastra…
Hunter104 Nov 15, 2023
a45bee1
Merge remote-tracking branch 'origin/feat/74-Menor-custo-logístico-pa…
Hunter104 Nov 16, 2023
1e8058d
fix: consertado erro de escrita de SuperintendenciaId
Hunter104 Nov 16, 2023
168ffac
feat: adiciona método de listagem de todas as superintendências
Hunter104 Nov 16, 2023
7f0d1b7
feat: adapta escolaService para considerar todas as superintendências…
Hunter104 Nov 16, 2023
705835e
refactor: extraída funcionalidade de calcular a superintendencia mais…
Hunter104 Nov 16, 2023
001dfc1
feat: trocado método de retorno de cálculo de polo mais próximo para …
Hunter104 Nov 16, 2023
d03bf18
feat: criado overload de cálculo de superintendência mais próxima com…
Hunter104 Nov 16, 2023
7d2494b
style: encurtados nomes de variáveis em cálculo de superintendência
Hunter104 Nov 16, 2023
7b762a1
refactor: extraída validação de strings de lat e lon para método de c…
Hunter104 Nov 16, 2023
f63d2fb
feat: adicionado cálculo de SuperI mais próxima à alterarDados de escola
Hunter104 Nov 16, 2023
62ddf8f
test: posição do ranque é começa em 1 em vez de 0
yudi-azvd Nov 17, 2023
de8ba9a
feat: adicionado overload em repositório para criar a partir de Escol…
Hunter104 Nov 17, 2023
1a7c3ca
feat: adicionado cálculo de superintendência mais próxima para criaçã…
Hunter104 Nov 17, 2023
82148d8
feat: adiciona cálculo de distância para superintendência em Atualiza…
Hunter104 Nov 17, 2023
3099c74
fix: retorna url da aplicação para porta 7084
Hunter104 Nov 17, 2023
e6503a5
feat: adiciona distância e Id da superintendência mais próxima para D…
Hunter104 Nov 17, 2023
a58935e
feat: adiciona SuperintendenciaService.cs para operações em superinte…
Hunter104 Nov 17, 2023
b3e9c8a
feat: adiciona SuperintendenciasController com método de ler superint…
Hunter104 Nov 17, 2023
59c3c3d
fix: Arrumando rotina de popula superintendencia por csv
victorhugo21 Nov 18, 2023
434ef18
feat: Adicionando a sede do DNIT no DF ao arquivo csv
victorhugo21 Nov 18, 2023
3b78c41
refactor: move lógica de requisição http para classe separada
yudi-azvd Nov 18, 2023
7e5ce07
Merge pull request #12 from fga-eps-mds/develop
thiagohdaqw Nov 14, 2023
34f0332
fix: Arrumando migração para merge com a us4
victorhugo21 Nov 18, 2023
3a2f86b
Merge branch 'feat/us4' into feat/74-Menor-custo-logístico-para-um-co…
victorhugo21 Nov 18, 2023
0499e81
fix: Arrumando migrações depois do merge
victorhugo21 Nov 19, 2023
accb181
fix: Arrumando o Database do HangfireDocker
victorhugo21 Nov 19, 2023
67b157f
feat: adiciona etapas nos detalhes da escola no ranque; habilita auto…
yudi-azvd Nov 19, 2023
98ee789
test: testa erro de conversão de json
yudi-azvd Nov 19, 2023
191e9b2
fix: ordena ranque em processamento pela data de inicio mais recente
thiagohdaqw Nov 19, 2023
b100ca1
fix: arruma ordenacao por posicao
thiagohdaqw Nov 19, 2023
cff01e8
refactor: ajustando detalhes da escola do ranque
thiagohdaqw Nov 19, 2023
9f23fe0
fix: Adicionando a uf da superintendencia mais proxima
victorhugo21 Nov 19, 2023
6bc0210
feat: adiciona chave de api para comunicar com o ups service
thiagopLacuna Nov 19, 2023
52c9b03
fix: tests
thiagopLacuna Nov 19, 2023
6dc967f
test: testa posição da escola em detalhes do ranque
yudi-azvd Nov 19, 2023
c7361ac
test: usa fake como background job client
yudi-azvd Nov 19, 2023
a7d5629
Merge remote-tracking branch 'origin/feat/us4' into feat/74-Menor-cus…
victorhugo21 Nov 19, 2023
b3dc7de
feat: Adicionando os dados ao ranque de escola
victorhugo21 Nov 19, 2023
ee7aaa8
Merge branch 'feat/us4' into feat/74-Menor-custo-logístico-para-um-co…
thiagohdaqw Nov 19, 2023
8c7d7ac
fix: tests
thiagopLacuna Nov 19, 2023
e6a73d3
feat: quando escola é criada individualmente, é feita reuisição para …
yudi-azvd Nov 19, 2023
134dbda
Merge remote-tracking branch 'origin/develop' into feat/74-Menor-cust…
thiagohdaqw Nov 19, 2023
279fd40
test: adicionando test da superintendencia
thiagohdaqw Nov 19, 2023
68b62f4
Merge remote-tracking branch 'origin/develop' into feat/us4
thiagohdaqw Nov 19, 2023
e757cd8
refactor: remove codigo duplicado
thiagohdaqw Nov 19, 2023
693ceb8
Merge pull request #13 from fga-eps-mds/feat/us4
thiagohdaqw Nov 19, 2023
fb0bbe7
refactor: remove referencias desnecessarias
thiagohdaqw Nov 19, 2023
377b631
refactor: remove referencias sem uso
thiagohdaqw Nov 19, 2023
8fa02b7
Merge pull request #14 from fga-eps-mds/feat/74-Menor-custo-logístico…
thiagohdaqw Nov 20, 2023
f634b36
chore: adiciona tabela de solicitações de ação
yudi-azvd Nov 23, 2023
5af284f
refactor: renomeia tabela para SolicitacaoAcao
yudi-azvd Nov 26, 2023
caf3c5b
chore: adiciona repositório de solicitações de ação
yudi-azvd Nov 26, 2023
9942085
feat: cria solicitação de ação no banco
yudi-azvd Nov 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.idea/
.git/
.github/
publish/
*/bin/*
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.cs]

# CS8618: Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
dotnet_diagnostic.CS8618.severity = none
63 changes: 0 additions & 63 deletions .github/workflows/build.yml

This file was deleted.

113 changes: 68 additions & 45 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,79 @@
name: Deploy AWS

name: CI
on:
workflow_dispatch:
push:
branches: [ main ]
branches:
- main
- develop
pull_request:
branches: [ main ]

types: [opened, synchronize, reopened]
jobs:
build:

runs-on: ubuntu-latest

ci-windows:
name: Build, test and analyze Windows
runs-on: windows-latest
steps:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v3
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner
- name: Install SonarCloud scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
shell: powershell
run: |
New-Item -Path .\.sonar\scanner -ItemType Directory
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
- name: Install dotnet-coverage
shell: powershell
run: dotnet tool install --global dotnet-coverage
- name: Clone trx2sonar
uses: actions/checkout@v3
with:
repository: gmarokov/dotnet-trx2sonar
path: dotnet-trx2sonar
- name: Setup trx2sonar
shell: powershell
run: |
dotnet restore dotnet-trx2sonar
dotnet build dotnet-trx2sonar --configuration Release
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"fga-eps-mds_2023.2-Dnit-EscolaService" /o:"fga-eps-mds-1" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml /d:sonar.testExecutionReportPaths=results.xml
dotnet build
dotnet-coverage collect "dotnet test" -f xml -o "coverage.xml"
dotnet test --logger "trx;LogFileName=results.trx" --results-directory ./TestResults/results.xml
./dotnet-trx2sonar/TrxToSonar/bin/Release/net6.0/TrxToSonar -d ./TestResults -o results.xml
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
ci-linux:
name: Build and test Linux
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Setup .NET Core
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'

- name: Install dependencies
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

run: dotnet build --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal

- name: Publish
run: dotnet publish -c Release -o '${{ github.workspace }}/out'

- name: Create email service .env
run: |
echo 'EMAIL_SERVICE_ADDRESS=${{ secrets.EMAIL_SERVICE_ADDRESS }}' > '${{ github.workspace }}/out/.env'
echo 'EMAIL_SERVICE_PASSWORD=${{ secrets.EMAIL_SERVICE_PASSWORD }}' >> '${{ github.workspace }}/out/.env'
echo 'EMAIL_DNIT=${{ secrets.EMAIL_DNIT }}' >> '${{ github.workspace }}/out/.env'

- name: Zip Package
run: |
cd ${{ github.workspace }}/out
zip -r ${{ github.workspace }}/out.zip * .env

- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v21
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: back-dnit-escola
environment_name: Back-dnit-escola-env
region: us-east-1
version_label: ${{ github.run_id }}
version_description: ${{ github.sha }}
deployment_package: ${{ github.workspace }}/out.zip
run: dotnet test --no-build --verbosity normal
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy
on:
push:
branches:
- develop

jobs:
deploy:
name: Deploy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal

- name: Publish
run: dotnet publish --no-restore -r linux-x64 -p:PublishSingleFile=true --self-contained false -o build app

- name: Compress
run: tar -czvf build.tar.gz ./build

- name: Upload Build
env:
DEPLOY_URL: ${{ secrets.DEPLOY_URL }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
curl --fail -X POST -L -F "[email protected]" $DEPLOY_URL/build_`git rev-parse HEAD`.tar.gz -H "upload-token: $DEPLOY_TOKEN"
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,27 @@ jobs:
steps:
- name: Get file name
id: name
run: echo "::set-output name=file_name::fga-eps-mds-2023.1-Dnit-EscolaService-$(TZ='America/Sao_Paulo' date +'%m-%d-%Y-%H-%M-%S')-${{github.ref_name}}"
run: echo "::set-output name=file_name::fga-eps-mds_2023.2-Dnit-EscolaService-$(TZ='America/Sao_Paulo' date +'%m-%d-%Y-%H-%M-%S')-${{github.ref_name}}"

- name: Copy repository
- name: Copy repository and download metrics
uses: actions/checkout@v2
- run: wget $METRICS_URL -O ${{ steps.name.outputs.file_name }}.json
env:
METRICS_URL: ${{ secrets.METRICS_URL }}
- uses: actions/upload-artifact@v2

- name: Uploads file
uses: actions/upload-artifact@v2
with:
name: ${{ steps.name.outputs.file_name }}.json
path: ${{ steps.name.outputs.file_name }}.json

- name: Send metrics to doc repo
uses: dmnemec/[email protected]
env:
API_TOKEN_GITHUB: ${{ secrets.TOKEN_GITHUB }}
API_TOKEN_GITHUB: ${{ secrets.GIT_TOKEN }}
with:
source_file: ${{ steps.name.outputs.file_name }}.json
destination_repo: 'fga-eps-mds/2023.1-Dnit-DOC'
destination_repo: 'fga-eps-mds/2023.2-Dnit-DOC'
destination_folder: 'analytics-raw-data'
user_email: ${{ secrets.GIT_EMAIL}}
user_name: ${{ secrets.GIT_USER }}
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,11 @@ MigrationBackup/
# Fody - auto-generated XML schema
FodyWeavers.xsd
/dominio/UsuarioDNIT.cs

coverage.*
app/build

report/
.vscode/
cov.sh
coveragereport
27 changes: 4 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,10 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build

WORKDIR /app

COPY EscolaService.sln ./
COPY app/app.csproj ./app/
COPY dominio/dominio.csproj ./dominio/
COPY repositorio/repositorio.csproj ./repositorio/
COPY service/service.csproj ./service/
COPY test/test.csproj ./test/
COPY . .

RUN dotnet restore
RUN dotnet tool install --global dotnet-ef

COPY . ./
ENV PATH="$PATH:/root/.dotnet/tools/"

RUN dotnet build -c Release

RUN dotnet publish app/app.csproj -c Release -o /app/out
RUN dotnet publish service/service.csproj -c Release -o /app/out
RUN dotnet publish repositorio/repositorio.csproj -c Release -o /app/out
RUN dotnet publish dominio/dominio.csproj -c Release -o /app/out
RUN dotnet publish test/test.csproj -c Release -o /app/out

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime

WORKDIR /app

COPY --from=build /app/out .

ENTRYPOINT ["dotnet", "app.dll"]
CMD dotnet watch --project app
19 changes: 6 additions & 13 deletions EscolaService.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ VisualStudioVersion = 17.0.32112.339
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "app", "app\app.csproj", "{A553D130-F52F-4C65-9EFA-DE58FAC021FA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dominio", "dominio\dominio.csproj", "{91F2F3EB-3054-4187-8E04-0E04EC55ED08}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "service", "service\service.csproj", "{7F390C74-6B61-4479-8840-E57D6B9E56C5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "repositorio", "repositorio\repositorio.csproj", "{456103BA-9130-4604-8AF7-49632FBAB6BB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "api", "api\api.csproj", "{91F2F3EB-3054-4187-8E04-0E04EC55ED08}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "test", "test\test.csproj", "{A6A560FE-BB47-4B88-AF9F-8AC9F5F856ED}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9283DB24-9EF4-4203-BDA7-F74DBE63BCF4}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -27,14 +28,6 @@ Global
{91F2F3EB-3054-4187-8E04-0E04EC55ED08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91F2F3EB-3054-4187-8E04-0E04EC55ED08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91F2F3EB-3054-4187-8E04-0E04EC55ED08}.Release|Any CPU.Build.0 = Release|Any CPU
{7F390C74-6B61-4479-8840-E57D6B9E56C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F390C74-6B61-4479-8840-E57D6B9E56C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F390C74-6B61-4479-8840-E57D6B9E56C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F390C74-6B61-4479-8840-E57D6B9E56C5}.Release|Any CPU.Build.0 = Release|Any CPU
{456103BA-9130-4604-8AF7-49632FBAB6BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{456103BA-9130-4604-8AF7-49632FBAB6BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{456103BA-9130-4604-8AF7-49632FBAB6BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{456103BA-9130-4604-8AF7-49632FBAB6BB}.Release|Any CPU.Build.0 = Release|Any CPU
{A6A560FE-BB47-4B88-AF9F-8AC9F5F856ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6A560FE-BB47-4B88-AF9F-8AC9F5F856ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6A560FE-BB47-4B88-AF9F-8AC9F5F856ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ _Observação_: No EscolaServices, é necessario adicionar um arquivo ".env" den

- EMAIL_SERVICE_ADDRESS : email usado para enviar a mensagem.
- EMAIL_SERVICE_PASSWORD: senha do email acima.
- EMAIL_SERVICE_SMTP: endereco do servidor smtp
- EMAIL_DNIT: email que receberá a mensagem.

#### Windows e MacOs
Expand Down
Loading
Loading