Skip to content

Commit

Permalink
Merge branch 'main' into feature/phpunit
Browse files Browse the repository at this point in the history
  • Loading branch information
lpirola authored May 23, 2024
2 parents f2072c5 + 3d2ae0e commit 7c61df0
Show file tree
Hide file tree
Showing 375 changed files with 12,777 additions and 1,716 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/01-bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Relatar um problema técnico/visual no mapas
description: 'Algo não está funcionando como esperado? Você encontrou uma falha ou bug no mapas?'
labels: [bug]
body:
- type: markdown
attributes:
value: |
Obrigado por relatar um problema encontrado no mapas.
Por favor preencha o modelo abaixo. Se você estiver relatando uma falha visual, será muito mais fácil
para que possamos corrigi-lo quando você anexar uma captura de tela também.
- type: input
attributes:
label: 'Navegador:'
description: Que tipo de navegador você está usando?
placeholder: Chrome
validations:
required: true
- type: input
attributes:
label: 'Navegador versão:'
description: Qual versão do navegador você está usando?
placeholder: '103.0.5060.134'
validations:
required: true
- type: textarea
attributes:
label: 'Como reproduzir o problema:'
placeholder: |
1. O que eu fiz.
2. O que eu esperava que acontecesse.
3. O que eu realmente consegui.
4. Se possível, imagens ou vídeos são bem-vindos.
validations:
required: true
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/02-feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Sugira uma nova funcionalidade ou melhoria para o mapas
description: 'Você tem uma ideia ou sugestão e quer compartilhar?'
labels: [Sugira um novo recurso ou melhoria]
body:
- type: markdown
attributes:
value: |
Você tem uma ideia de como melhorar o mapas? Fantástico!
Antes de enviar, dê uma olhada nos problemas existentes, se já houver
algo relacionado à sua sugestão.
- type: textarea
attributes:
label: 'Insira suas sugestões em detalhes:'
placeholder: |
1. O que eu esperava que acontecesse.
2. Seu motivo (se possível, imagens ou vídeos são bem-vindos).
3. O que pretendo fazer (opcional, mas melhor).
validations:
required: true
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Descrição

<!-- Escreva uma breve descrição das mudanças introduzidas por este PR -->

## Validação

<!-- Como você sabe que isso está funcionando? O que um revisor deve procurar? Forneça uma captura de tela se sua alteração for visual. -->

## Issues relacionadas

<!--
Link para a issue corrigido por este PR (se houver)
por exemplo. Task 1 #1234, Task 2 #1234, Task 3 #1234, etc.
-->
88 changes: 34 additions & 54 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,46 @@
name: ci

on:
push:
branches:
- "master"
- "develop"
tags:
- "v*.*.*"
pull_request:
branches:
- "develop"
- homolog

workflow_dispatch:

jobs:
docker:
BUILD:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
docker.io/hacklab/mapasculturais
# ghcr.io/username/app
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2

- uses: actions/[email protected]

- name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# -
# name: Login to GHCR
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Ajusta branch do MultipleLocalAuth
run: cd src/plugins/MultipleLocalAuth && git checkout v3.0.0

- name: Criação da Imagem docker
uses: docker/[email protected]
with:
file: ./docker/Dockerfile
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: ./
file: ./Dockerfile
push: true
tags: |
secultceara/mapascultural:7.3.7
secultceara/mapascultural:latest
DEPLOY:
needs: BUILD
runs-on: mapahomolog
steps:
- name: Pull das imagens docker
run: cd /opt/docker/mapa7 && sudo docker-compose pull
- name: Restart do docker-compose para atualizar o container com a nova imagem
run: cd /opt/docker/mapa7 && sudo docker-compose down && sudo docker-compose up -d
45 changes: 45 additions & 0 deletions .github/workflows/cicd-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: ci/cd-dev

on:
pull_request:
branches:
- develop

workflow_dispatch:

jobs:
BUILD:
runs-on: ubuntu-latest
steps:

- uses: actions/[email protected]

- name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Ajusta branch do MultipleLocalAuth
run: cd src/plugins/MultipleLocalAuth && git checkout v3.0.0

- name: Criação da Imagem docker
uses: docker/[email protected]
with:
context: ./
file: ./Dockerfile
push: true
tags: |
secultceara/mapascultural:7.3.7-dev
DEPLOY:
needs: BUILD
runs-on: mapahomolog
steps:
- name: Pull das imagens docker
run: cd /opt/docker/developv7 && sudo docker-compose pull
- name: Restart do docker-compose para atualizar o container com a nova imagem
run: cd /opt/docker/developv7 && sudo docker-compose down && sudo docker-compose up -d
27 changes: 27 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Deploy to VPS"
on:
push:
branches:
- main

jobs:
build_deploy:
runs-on: ubuntu-latest

steps:
- name: "Checkout code"
uses: actions/checkout@v4

- name: executing remote ssh commands using password
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd ${{ secrets._PROJECT_PATH }}
git pull origin main
cd ${{ secrets._STACK_PATH }}
docker compose -f ${{ secrets._STACK_FILE }} stop
docker compose -f ${{ secrets._STACK_FILE }} up -d
53 changes: 0 additions & 53 deletions .github/workflows/rc.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ dev/docker-data/
src/themes/BaseV1/assets/css/main.css
src/themes/BaseV1/assets/css/main.css.map
public/assets/
docker-data/
src/.phpdoc
.phpunit*
.phpdocs*
.env
.idea
.phpunit.result.cache
.php-cs-fixer.cache
docker-data
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "src/plugins/MultipleLocalAuth"]
path = src/plugins/MultipleLocalAuth
url = https://github.com/mapasculturais/plugin-MultipleLocalAuth
branch = master
[submodule "src/themes/MapasCE"]
path = src/themes/MapasCE
url = https://github.com/secultce/theme-MapasCE
branch = main
8 changes: 8 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: docker compose -f dev/docker-compose.yml up -d
30 changes: 30 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$finder = (new Finder())
->ignoreDotFiles(false)
->ignoreVCSIgnored(true)
->exclude(['logs', 'var', 'vendor'])
->in(__DIR__)
;

return (new Config())
->setRiskyAllowed(true)
->setRules([
'psr_autoloading' => true,
'@PSR12' => true,
'@Symfony' => true,
'@PHP82Migration' => true,
'array_syntax' => ['syntax' => 'short'],
'declare_strict_types' => true,
'void_return' => true,
'yoda_style' => true,
'increment_style' => ['style' => 'post'],
'global_namespace_import' => true,
])
->setFinder($finder)
;
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ e este projeto adere ao [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- resolve aplicar filtros para pesquisa de eventos
- Faz as abas `com permissão` das entidades do painel listarem também as entidades em rascunho

## [7.3.58] - 2024-05-22
### Correções
- Remove webmanifest para evitar erros no carregamento atravez do safari

## [7.3.57] - 2024-05-17
### Melhorias
- Não solicita o campo País em ambientes com a configuração statesAndCitiesCountryCode definida como BR
Expand Down
Loading

0 comments on commit 7c61df0

Please sign in to comment.