-
Notifications
You must be signed in to change notification settings - Fork 3
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 #51 from ThiagoPanini/feature/repo-ci-config
pr(dev): Aprimoramento esteira CI com novos workflows e steps
- Loading branch information
Showing
6 changed files
with
272 additions
and
7 deletions.
There are no files selected for viewing
Empty file.
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,67 @@ | ||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
|
||
exclude-labels: | ||
- github-bot 🤖 | ||
|
||
categories: | ||
- title: 🛠️ Breaking Changes | ||
labels: | ||
- breaking-change 🛠️ | ||
|
||
- title: 🚀 Features | ||
labels: | ||
- feature 🚀 | ||
- enhancement 🍀 | ||
|
||
- title: 🐞 Bug Fixes | ||
labels: | ||
- bug 🐞 | ||
|
||
- title: 💻 Application | ||
labels: | ||
- app 💻 | ||
|
||
- title: 🧱 Infrastructure | ||
labels: | ||
- infra 🧱 | ||
|
||
- title: 🛡️ Tests | ||
labels: | ||
- tests 🛡️ | ||
|
||
- title: ⚙️ Configuration and Maintenance | ||
- config ⚙️ | ||
|
||
- title: 🖍️ Documentation | ||
labels: | ||
- doc 🖍️ | ||
|
||
- title: Other Changes | ||
labels: | ||
- "*" | ||
|
||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' | ||
|
||
version-resolver: | ||
major: | ||
labels: | ||
- breaking-change 🛠️ | ||
minor: | ||
labels: | ||
- feature 🚀 | ||
- enhancement 🍀 | ||
patch: | ||
labels: | ||
- app 💻 | ||
- infra 🧱 | ||
- tests 🛡️ | ||
- bug 🐞 | ||
- doc 🖍️ | ||
- observability 👁️🗨️ | ||
|
||
default: patch | ||
|
||
template: | | ||
## Changes |
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,25 @@ | ||
name: 📦 Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
update-release-draft: | ||
name: "update-relase-draft" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Cria novo draft de release | ||
uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
config-name: configs/release-drafter.yml |
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,89 @@ | ||
name: ⚙️ CI terraglue - develop | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
ci-python: | ||
name: ci-python | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Instalação do Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Instalação das Dependências | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r ./app/requirements-ci.txt | ||
- name: Análise de Linter - flake8 | ||
run: | ||
flake8 . --ignore E501 | ||
|
||
- name: Análise de Docstrings - pydocstyle | ||
run: | ||
pydocstyle --match-dir ./app/src/*.py | ||
|
||
ci-terraform: | ||
name: ci-terraform | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Configuração de Credenciais AWS | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_OIDC_ROLE }} | ||
role-session-name: OIDCSession | ||
aws-region: sa-east-1 | ||
|
||
- name: Configuração e Setup do Terraform | ||
uses: hashicorp/setup-terraform@v2 | ||
|
||
- name: terraform init | ||
run: | | ||
cd infra/ | ||
terraform init | ||
- name: terraform plan | ||
run: | | ||
cd infra/ | ||
terraform plan | ||
continue-on-error: false | ||
|
||
open-pr-to-main: | ||
name: open-pr-to-main | ||
runs-on: ubuntu-latest | ||
needs: | ||
- ci-python | ||
- ci-terraform | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cria PR para main | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
source_branch: ${{ github.ref }} | ||
destination_branch: "main" | ||
pr_title: "[PREENCHER] develop -> main" | ||
pr_template: ".github/pull_request_template.md" | ||
pr_assignee: "ThiagoPanini" | ||
pr_label: github-bot 🤖 | ||
github_token: ${{ secrets.GITHUB_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,89 @@ | ||
name: ⚙️ CI terraglue - feature branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature** | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
ci-python: | ||
name: ci-python | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Instalação do Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Instalação das Dependências | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r ./app/requirements-ci.txt | ||
- name: Análise de Linter - flake8 | ||
run: | ||
flake8 . --ignore E501 | ||
|
||
- name: Análise de Docstrings - pydocstyle | ||
run: | ||
pydocstyle --match-dir ./app/src/*.py | ||
|
||
ci-terraform: | ||
name: ci-terraform | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Configuração de Credenciais AWS | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_OIDC_ROLE }} | ||
role-session-name: OIDCSession | ||
aws-region: sa-east-1 | ||
|
||
- name: Configuração e Setup do Terraform | ||
uses: hashicorp/setup-terraform@v2 | ||
|
||
- name: terraform init | ||
run: | | ||
cd infra/ | ||
terraform init | ||
- name: terraform plan | ||
run: | | ||
cd infra/ | ||
terraform plan | ||
continue-on-error: false | ||
|
||
open-pr-to-dev: | ||
name: open-pr-to-dev | ||
runs-on: ubuntu-latest | ||
needs: | ||
- ci-python | ||
- ci-terraform | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cria PR para dev | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
source_branch: ${{ github.ref }} | ||
destination_branch: "develop" | ||
pr_title: "[PREENCHER] ${{ github.ref }} -> develop" | ||
pr_template: ".github/pull_request_template.md" | ||
pr_assignee: "ThiagoPanini" | ||
pr_label: github-bot 🤖 | ||
github_token: ${{ secrets.GITHUB_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