From cc121d9859c32713eac2c7a9a55a759c5062404b Mon Sep 17 00:00:00 2001 From: marcelopenas Date: Thu, 5 Nov 2026 12:16:03 -0300 Subject: [PATCH] ci: add service-owned quality and image workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ci.yml | 65 ++++++++++++++++++++++++++++++++++++++++ README.md | 4 +++ 2 files changed, 69 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..b534d3b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,65 @@ +name: Order Contract CI + +on: + pull_request: + push: + branches: [main, master, feature/spring-microservices, chore/registry-ci] + +permissions: + contents: read + security-events: write + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '25' + cache: maven + - run: ./mvnw --batch-mode validate + + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: | + git diff --check + ! grep -R -n -E '^(<<<<<<<|=======|>>>>>>>)' --exclude-dir=.git . + + test: + runs-on: ubuntu-latest + needs: [lint, format] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '25' + cache: maven + - run: ./mvnw --batch-mode --no-transfer-progress test + + quality: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '25' + cache: maven + - run: ./mvnw --batch-mode --no-transfer-progress verify + + security: + runs-on: ubuntu-latest + needs: lint + steps: + - uses: actions/checkout@v4 + - uses: github/codeql-action/init@v3 + with: + languages: java + - uses: github/codeql-action/autobuild@v3 + - uses: github/codeql-action/analyze@v3 diff --git a/README.md b/README.md index b2373a5..34e2cf6 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,7 @@ response records and the controller interface consumed by This contract has no runtime configuration and requires no GitHub Actions secrets. + +The contract workflow validates formatting, Maven compilation, tests, quality, +and CodeQL. It does not publish a container because it is a reusable Java +library rather than a runnable service.