Skip to content
Open
Changes from all commits
Commits
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
56 changes: 56 additions & 0 deletions workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Operator Engine CI

on:
push:
branches: [ "main", "dev", "release" ]
pull_request:
branches: [ "main", "dev" ]
workflow_dispatch:

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout repositório
uses: actions/checkout@v3

- name: Configurar Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Cache Python dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Instalar dependências
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi

- name: Verificar PEP8 com flake8
run: |
pip install flake8
flake8 operator_engine/ --count --select=E9,F63,F7,F82 --show-source --statistics

- name: Executar testes (PyTest)
run: |
pip install pytest
pytest tests/ --maxfail=3 --disable-warnings

- name: Validar tipo com mypy
run: |
pip install mypy
mypy operator_engine/

- name: Upload de artefatos (logs, jsons)
if: always()
uses: actions/upload-artifact@v3
with:
name: engine-logs
path: logs/*.json