Skip to content

Commit 30d6587

Browse files
jimisolaclaude
andauthored
ci: use shared build and lint workflows (#110)
* ci: use shared build and lint workflows Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola <jimisola@jimisola.com> * build: compile for Java 25, the latest LTS Compile target now equals the CI JDK. Consumers need Java 25 or newer to run the plugin or processor. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola <jimisola@jimisola.com> * ci: pin shared workflows to the .github 1.3.0 SHA Pin to 193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 (# 1.3.0). The 1.3.0 tag is pending; Renovate resolves it once it exists. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola <jimisola@jimisola.com> * chore: drop explanatory comments The PR description and commits carry the rationale. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola <jimisola@jimisola.com> * ci: pin shared workflows to .github 1.2.2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola <jimisola@jimisola.com> --------- Signed-off-by: Jimisola <jimisola@jimisola.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent be40d58 commit 30d6587

6 files changed

Lines changed: 47 additions & 53 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 41 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -28,54 +28,48 @@ permissions:
2828
contents: read
2929

3030
jobs:
31+
lint:
32+
uses: reqstool/.github/.github/workflows/java-lint.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2
33+
with:
34+
build-tool: gradle
35+
3136
build:
32-
runs-on: ubuntu-latest
33-
strategy:
34-
fail-fast: false
35-
matrix:
36-
reqstool-source: [pypi, main]
37-
steps:
38-
# Full history and tags: git-dyn-semver derives the version from git state, so a
39-
# shallow clone would build the wrong number rather than fail.
40-
- uses: actions/checkout@v7.0.1
41-
with:
42-
persist-credentials: false
43-
fetch-depth: 0
44-
fetch-tags: true
45-
ref: ${{ inputs.ref || github.ref }}
46-
- name: Set up Java
47-
uses: actions/setup-java@v6.3.0
48-
with:
49-
java-version: "21.0.12+8.0.LTS"
50-
distribution: "temurin"
51-
- name: Build
52-
run: ./gradlew clean build
53-
- name: Self-apply plugin to assemble dataset zip
54-
# True self-application (publishing to mavenLocal and re-applying the plugin
55-
# to its own sources from a separate project) is not yet wired up for Gradle.
56-
# As an interim measure, merge the annotation processor's own main/test output
57-
# (already produced by `./gradlew build` above) the same way the plugin's
58-
# combineOutput() would, so reqstool status has real, non-fabricated data.
59-
run: |
60-
mkdir -p build/reqstool
61-
{
62-
echo "# yaml-language-server: \$schema=https://raw.githubusercontent.com/reqstool/reqstool-client/main/src/reqstool/resources/schemas/v1/annotations.schema.json"
63-
yq eval-all '. as $item ireduce ({}; . * $item )' \
64-
build/generated/sources/annotationProcessor/java/main/resources/annotations.yml \
65-
build/generated/sources/annotationProcessor/java/test/resources/annotations.yml | grep -v "^#"
66-
} > build/reqstool/annotations.yml
67-
- name: Install reqstool
68-
uses: reqstool/.github/.github/actions/install-reqstool@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2
69-
with:
70-
reqstool-source: ${{ matrix.reqstool-source }}
71-
- name: Validate reqstool spec completeness
72-
# not yet available in the latest PyPI release
73-
if: matrix.reqstool-source == 'main'
74-
uses: reqstool/.github/.github/actions/validate-reqstool@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2
75-
- name: Run reqstool status
76-
uses: reqstool/.github/.github/actions/reqstool-status@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2
77-
with:
78-
fail-if-incomplete: "true"
37+
needs: lint
38+
uses: reqstool/.github/.github/workflows/java-build-gradle.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2
39+
with:
40+
ref: ${{ inputs.ref }}
41+
artifact-name: ${{ inputs.artifact-name || 'dist' }}
42+
post-test-command: |
43+
mkdir -p build/reqstool
44+
{
45+
echo "# yaml-language-server: \$schema=https://raw.githubusercontent.com/reqstool/reqstool-client/main/src/reqstool/resources/schemas/v1/annotations.schema.json"
46+
yq eval-all '. as $item ireduce ({}; . * $item )' \
47+
build/generated/sources/annotationProcessor/java/main/resources/annotations.yml \
48+
build/generated/sources/annotationProcessor/java/test/resources/annotations.yml | grep -v "^#"
49+
} > build/reqstool/annotations.yml
50+
51+
reqstool:
52+
needs: build
53+
uses: reqstool/.github/.github/workflows/common-reqstool-verify.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2
54+
with:
55+
build-artifact: ${{ inputs.artifact-name || 'dist' }}-build
56+
57+
smoke:
58+
needs: build
59+
uses: reqstool/.github/.github/workflows/java-smoke.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2
60+
with:
61+
command: ./gradlew --console=plain build
7962

8063
validate-openspec:
8164
uses: reqstool/.github/.github/workflows/common-validate-openspec.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2
65+
66+
ci:
67+
if: ${{ always() }}
68+
needs: [lint, build, reqstool, smoke, validate-openspec]
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Fail unless every needed job succeeded
72+
env:
73+
NEEDS: ${{ toJSON(needs) }}
74+
run: |
75+
echo "$NEEDS" | python3 -c 'import json,sys; r={k:v["result"] for k,v in json.load(sys.stdin).items()}; print(r); sys.exit(0 if all(v=="success" for v in r.values()) else 1)'

‎CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A Gradle plugin (`io.github.reqstool.gradle-plugin`) for
99
`@SVCs` annotations emitted by the reqstool annotation processor during compilation,
1010
combines them with a dataset (`requirements.yml`, etc.) and test result XML files, and
1111
packages everything into a `<name>-<version>-reqstool.zip` artifact that the reqstool CLI
12-
can analyze. Requires Java 21+.
12+
can analyze. Requires Java 25+.
1313

1414
See `README.md` for the user-facing configuration reference (extension properties, task
1515
behavior, JUnit 5 parameterized test setup) and `CONTRIBUTING.md` for setup/DCO/commit

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ For DCO sign-off, commit conventions, and code review process, see the organizat
66

77
## Prerequisites
88

9-
- Java 21+
9+
- Java 25+
1010
- Gradle 9.3+ (use the wrapper)
1111
- [reqstool](https://github.com/reqstool/reqstool-client) (`pipx install reqstool`)
1212
- [OpenSpec](https://github.com/Fission-AI/OpenSpec) (`npm install -g @fission-ai/openspec`)

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Gradle build plugin for [reqstool](https://github.com/reqstool/reqstool-client)
1010

1111
## Overview
1212

13-
Collects `@Requirements` and `@SVCs` annotations from compiled Java code, combines them with test results, and packages everything into a ZIP artifact for analysis by the reqstool CLI. Supports Java 21+.
13+
Collects `@Requirements` and `@SVCs` annotations from compiled Java code, combines them with test results, and packages everything into a ZIP artifact for analysis by the reqstool CLI. Supports Java 25+.
1414

1515
The plugin automatically wires task dependencies: `assembleRequirements` depends on `check` and on all `compileJava` tasks, and `build` depends on `assembleRequirements`. No manual task wiring is needed in most projects.
1616

‎build.gradle‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ plugins {
1313
group = 'io.github.reqstool'
1414

1515
java {
16-
sourceCompatibility = JavaVersion.VERSION_21
17-
targetCompatibility = JavaVersion.VERSION_21
16+
sourceCompatibility = JavaVersion.VERSION_25
17+
targetCompatibility = JavaVersion.VERSION_25
1818
}
1919

2020
repositories {

‎docs/modules/ROOT/pages/index.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Run `gradle build` and the ZIP artifact will be created automatically.
6060
== Prerequisites
6161

6262
* Gradle 9.0+
63-
* Java 21+
63+
* Java 25+
6464
* A `requirements.yml` file in the dataset directory (default: `reqstool/`)
6565

6666
== License

0 commit comments

Comments
 (0)