From f4da79a3f70202efee448aa74b40249f7e5c478b Mon Sep 17 00:00:00 2001 From: Rodrigo Patote <47055922+patote85@users.noreply.github.com> Date: Mon, 21 Sep 2026 12:28:09 -0300 Subject: [PATCH 1/3] ci: add make check (pytest + cdk synth) --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dc3649a --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +# Agent-friendly check: shortest path = correct path (pytest + cdk synth). +# No deploy. Requires: pip install -r requirements.txt and -r cdk/requirements.txt; Node for npx. + +.PHONY: check test synth + +test: + PYTHONPATH=. pytest tests/test_exclusao.py -v + +synth: + npx --yes aws-cdk@2 synth + +check: test synth From e2641b3c0960214ce469c3b895f27959556a0141 Mon Sep 17 00:00:00 2001 From: Rodrigo Patote <47055922+patote85@users.noreply.github.com> Date: Mon, 21 Sep 2026 12:28:10 -0300 Subject: [PATCH 2/3] ci: add synth job (cdk synth, no deploy) --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e69d223..ce80cbb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,3 +29,25 @@ jobs: - name: Run pytest # moto mocks DynamoDB — no AWS credentials required run: PYTHONPATH=. pytest tests/test_exclusao.py -v + + synth: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + cache-dependency-path: cdk/requirements.txt + + - name: Install CDK Python deps + run: pip install -r cdk/requirements.txt + + - uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: CDK synth + # No AWS credentials — synth only, never deploy + run: npx --yes aws-cdk@2 synth From a4bcae906934051c357c27faeade061a4af29243 Mon Sep 17 00:00:00 2001 From: Rodrigo Patote <47055922+patote85@users.noreply.github.com> Date: Mon, 21 Sep 2026 12:28:23 -0300 Subject: [PATCH 3/3] =?UTF-8?q?docs:=20README=20=E2=80=94=20make=20check?= =?UTF-8?q?=20+=20CI=20synth=20(incremental)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36c7617..c6ac21b 100644 --- a/README.md +++ b/README.md @@ -36,16 +36,19 @@ Cada solicitação grava **dois** itens (histórico depois ponteiro): - **Confirmar pagamento** atualiza histórico e depois `LATEST` (condition em `active_request_id`). - Writes ordenados (`put`/`update`) de propósito neste PR — TransactWrite fica pra um follow-up se precisar atomicidade forte. -### Testes +### Testes / check local ```bash pip install -r requirements.txt +pip install -r cdk/requirements.txt # só se for rodar synth PYTHONPATH=. pytest tests/test_exclusao.py -v +# ou o caminho curto (pytest + cdk synth, sem deploy): +make check ``` Usa **moto** (sem AWS real). O pacote `lambda/` importa via `importlib` (nome reservado). -CI (GitHub Actions): mesmo comando em Python 3.12 em todo PR/`push` na `main` — sem credenciais AWS no runner. +CI (GitHub Actions): em todo PR/`push` na `main` — job **`test`** (pytest/moto, Python 3.12) e job **`synth`** (`npx aws-cdk@2 synth`, sem credenciais AWS / sem deploy). ---