From 7b6f917ffb136fc642ba4f212bc2a3732d936aad Mon Sep 17 00:00:00 2001 From: Bruno Souza Date: Mon, 2 Nov 2026 13:25:31 +0000 Subject: [PATCH 1/3] chore(ci): package the Mule application on pull requests mvn package with MUnit skipped: MUnit needs MuleSoft Enterprise credentials this public workflow does not have, so it stays local. Refs AB#245 --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..79f0aee --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: CI + +# Minimal check on every pull request: package the Mule application with +# MUnit skipped. MUnit runs on the Mule Enterprise runtime, which needs +# MuleSoft Enterprise repository credentials that this public workflow does +# not have, so MUnit runs locally before each pull request (see AGENTS.md). +# Actions are pinned by commit SHA, with the tag in a comment. + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +env: + MAVEN_VERSION: "3.9.11" + MAVEN_SHA512: bcfe4fe305c962ace56ac7b5fc7a08b87d5abd8b7e89027ab251069faebee516b0ded8961445d6d91ec1985dfe30f8153268843c89aa392733d1a3ec956c9978 + +jobs: + build: + name: build + runs-on: ubuntu-24.04 + timeout-minutes: 20 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0 + with: + distribution: temurin + java-version: "17.0.21" + cache: maven + + - name: Install Maven ${{ env.MAVEN_VERSION }} + run: | + curl -fsSLo "$RUNNER_TEMP/maven.tar.gz" "https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz" + echo "${MAVEN_SHA512} $RUNNER_TEMP/maven.tar.gz" | sha512sum -c - + tar -xzf "$RUNNER_TEMP/maven.tar.gz" -C "$RUNNER_TEMP" + echo "$RUNNER_TEMP/apache-maven-${MAVEN_VERSION}/bin" >> "$GITHUB_PATH" + + - name: mvn package (MUnit skipped) + run: mvn -B -ntp clean package -DskipMunitTests From e7eaa4af24babfcacc5de6b5550f1a7a9ea89716 Mon Sep 17 00:00:00 2001 From: Bruno Souza Date: Mon, 2 Nov 2026 13:25:31 +0000 Subject: [PATCH 2/3] docs(agents): declare the reference model Model: reference, Data and Article lines, Build/Test/Run locally lines; the obsolete Trivial line removed; Deliver and verify is CI green on the merge commit. Refs AB#245 --- AGENTS.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a866f71..977034b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,10 +1,16 @@ # mulesoft-patterns-examples: project context -Stack: Mule 4, MUnit, Maven +Stack: Mule 4, MUnit, Maven, GitHub Actions Delivery: E reference +Model: reference Integration branch: `main` -Trivial: none -Deliver and verify: nothing runs on merge; verify with `mvn clean test` (MUnit; needs the MuleSoft Enterprise repository credentials in `~/.m2/settings.xml`) and, with the app running locally, that the endpoints in `requests.http` the published articles cite still answer. Merges stay with Bruno (`rules/README.md`), stricter than the playbook's level 1 on purpose +Data: none +Article: none + +- Build: `mvn -B clean package -DskipMunitTests` (what CI runs on every pull request, `.github/workflows/ci.yml`; no credentials needed) +- Test: `mvn clean test` (MUnit, fails below 80% application coverage; needs the MuleSoft Enterprise repository credentials in `~/.m2/settings.xml`, so it runs locally before each pull request, not in CI) +- Run locally: `mvn clean package`, run the app on a local Mule 4.9 runtime and call the endpoints in `requests.http` +- Deliver and verify: `nothing is deployed; CI green on the merge commit` ## Purpose @@ -45,3 +51,9 @@ GitHub default branch inspected on 2026-10-06: `main`. Release bases are defined ## Project rules Before planning, reviewing or changing this project, read [the applicable project rules](rules/README.md). + +- Board area: `mulesoft` (Azure Boards, project `brunosouzas`). +- OpenSpec: no: every change takes the small path. +- Merges stay with Bruno (`rules/README.md`), stricter than the playbook's level 1 on purpose. +- Releases: none. When an article cites a version, Bruno creates an `article-` tag (not `v*`). +- Articles cite this repository (`50-writing/solid-in-mulesoft/`, `50-writing/integration-patterns-in-mulesoft/`): keep the endpoints in `requests.http` and the paths they link answering after a merge. From 8006ae4314982041ff1b7ac20c016f1a878fa243 Mon Sep 17 00:00:00 2001 From: Bruno Souza Date: Mon, 2 Nov 2026 13:56:47 +0000 Subject: [PATCH 3/3] ci: cancel only superseded pull request runs and verify cited paths Refs AB#245 --- .github/workflows/ci.yml | 2 +- AGENTS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79f0aee..67aa1d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ permissions: concurrency: group: ci-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: MAVEN_VERSION: "3.9.11" diff --git a/AGENTS.md b/AGENTS.md index 977034b..8c14c0a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,7 +10,7 @@ Article: none - Build: `mvn -B clean package -DskipMunitTests` (what CI runs on every pull request, `.github/workflows/ci.yml`; no credentials needed) - Test: `mvn clean test` (MUnit, fails below 80% application coverage; needs the MuleSoft Enterprise repository credentials in `~/.m2/settings.xml`, so it runs locally before each pull request, not in CI) - Run locally: `mvn clean package`, run the app on a local Mule 4.9 runtime and call the endpoints in `requests.http` -- Deliver and verify: `nothing is deployed; CI green on the merge commit` +- Deliver and verify: `nothing is deployed; CI green on the merge commit, and the paths and requests.http endpoints that 50-writing/solid-in-mulesoft/ and integration-patterns-in-mulesoft/ cite still resolve on main` ## Purpose