From fddf8330faabc1667224d948dc2e37e7c3f9b246 Mon Sep 17 00:00:00 2001 From: Marcos Isidio <187781982+UltraGenBR@users.noreply.github.com> Date: Mon, 12 May 2025 13:47:04 -0300 Subject: [PATCH 1/2] Criar workflow.yaml --- workflow.yaml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 workflow.yaml diff --git a/workflow.yaml b/workflow.yaml new file mode 100644 index 0000000..749565f --- /dev/null +++ b/workflow.yaml @@ -0,0 +1,49 @@ +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: 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 \ No newline at end of file From 5b95d69ae65de17912c3bae64e4179f2ec06789d Mon Sep 17 00:00:00 2001 From: Marcos Isidio <187781982+UltraGenBR@users.noreply.github.com> Date: Tue, 15 Jul 2025 09:43:15 -0400 Subject: [PATCH 2/2] Update workflow.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Marcos Isidio <187781982+UltraGenBR@users.noreply.github.com> --- workflow.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/workflow.yaml b/workflow.yaml index 749565f..78e2141 100644 --- a/workflow.yaml +++ b/workflow.yaml @@ -20,6 +20,13 @@ jobs: 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