diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c7bff5..9792c4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,11 @@ +# Called by pr.yml on every pull request that is not documentation only; +# dispatch it to run it on a branch without a pull request. name: CI run-name: "CI (${{ github.event_name }}) on ${{ github.ref_name }} by @${{ github.actor }}" on: - push: - branches: ["**"] - paths-ignore: ['**/*.md'] - pull_request: - branches: ["**"] - paths-ignore: ['**/*.md'] + workflow_call: + workflow_dispatch: permissions: contents: read @@ -15,15 +13,16 @@ permissions: jobs: ci: - uses: otfabric/.github/.github/workflows/go-ci.yml@v3.3.0 + uses: otfabric/.github/.github/workflows/go-ci.yml@v3.8.0 with: + # otfabric-policy runs in docs.yml, on every pull request and push to main. + run-policy: false run-govulncheck: true coverage-min: "90" fuzz-time: 10s codecov-name: sunspecctl go-versions: '["1.26", "1.27"]' test-exclude-regex: "/example(s)?($|/)" - policy-version: v1.4.2 secrets: inherit # The per-package coverage floor (TEST-012). diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 702eca7..f1fe0e5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,19 +1,20 @@ # Documents against the code (DOC-008, standards/documentation.md#doc-sync). -# No path filter: this is the check that runs when ci.yml skips a -# Markdown-only change, so branch protection can require it. +# pr.yml calls it on every pull request; on main it runs on every push, with +# no path filter. name: Docs on: push: branches: [main] - pull_request: + workflow_call: + workflow_dispatch: permissions: contents: read jobs: docs: - uses: otfabric/.github/.github/workflows/docs-check.yml@v3.5.0 + uses: otfabric/.github/.github/workflows/docs-check.yml@v3.8.0 with: docsync-version: v0.3.1 - policy-version: v1.4.2 + policy-version: v1.6.1 secrets: inherit diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..49a2e3b --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,50 @@ +# The pull request gate (otfabric/.github PR workflow), generated by +# otfabric/.github scripts/rollout/pr-workflow.py. No path filter: the light +# checks always run, the heavy ones unless the change is documentation only, +# then "OT Fabric Required Checks", the only check a ruleset requires. +name: PR +on: + pull_request: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + changes: + uses: otfabric/.github/.github/workflows/pr-changes.yml@v3.8.0 + with: + # Code reads or generates these Markdown files: they count as code. + code-paths: | + README.md + + ci: + needs: changes + if: needs.changes.outputs.full == 'true' + permissions: + contents: read + id-token: write + uses: ./.github/workflows/ci.yml + secrets: inherit + + docs: + permissions: + contents: read + uses: ./.github/workflows/docs.yml + secrets: inherit + + required: + name: OT Fabric Required Checks + needs: [changes, docs, ci] + if: always() + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: otfabric/.github/actions/required-gate@v3.8.0 + with: + needs: ${{ toJSON(needs) }} + required: changes docs + required-for-code: ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5a88d8b..2798255 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ permissions: jobs: release-sunspecctl-binary: - uses: otfabric/.github/.github/workflows/go-binary-release.yml@v3.6.0 + uses: otfabric/.github/.github/workflows/go-binary-release.yml@v3.8.0 with: bump: ${{ inputs.bump }} binary-name: sunspecctl diff --git a/.otfabric/policy.yaml b/.otfabric/policy.yaml index f9c7aa3..4f623bd 100644 --- a/.otfabric/policy.yaml +++ b/.otfabric/policy.yaml @@ -1,5 +1,5 @@ # OT Fabric engineering policy adoption (otfabric/engineering standards/README.md#adoption). -policy: "1.4" +policy: "1.6" profile: cli mode: enforce owner: bartvanbos diff --git a/AGENTS.md b/AGENTS.md index d0c8d2c..61d736f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ Command-line tool for reading and simulating SunSpec devices over Modbus, built ## Organisation standards -This repository follows **otfabric/engineering policy 1.4**, profile **cli** (`.otfabric/policy.yaml`, mode `enforce`). Where this file and the organisation standards disagree, this file wins here — say so in your report. +This repository follows **otfabric/engineering policy 1.6**, profile **cli** (`.otfabric/policy.yaml`, mode `enforce`). Where this file and the organisation standards disagree, this file wins here — say so in your report. ## Where the truth lives diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f35f6c2..dfb2b22 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -124,3 +124,14 @@ capture.go capture and template: write device files (format: go-sunspec/devi ## License By contributing to `sunspecctl`, you agree that your contributions will be licensed under the [MIT License](LICENSE). + +## When CI runs + +| Event | Workflow | What runs | +|---|---|---| +| Pull request | `pr.yml` | `docs.yml` (docsync, otfabric-policy) always; `ci.yml` unless every changed file is documentation; then `OT Fabric Required Checks` | +| Push to a branch | none | nothing; dispatch `ci.yml` to test a branch without a pull request | +| Push to `main` | `docs.yml` | the light checks; the merged commit was tested as the pull request's merge commit | +| Release | `release.yml` | the release workflow tests the release commit again | + +Documentation means an added or modified `*.md` file outside `.github/`, `testdata/` and `vendor/`, other than `AGENTS.md` and `CLAUDE.md`, and other than `README.md`, which code reads. A deleted or renamed document, or any other file, runs everything. `OT Fabric Required Checks` fails unless every job that applies succeeded; its summary lists them. diff --git a/README.md b/README.md index 923173f..167e78a 100644 --- a/README.md +++ b/README.md @@ -402,7 +402,7 @@ Tests need no hardware: they run against the SunSpec fixture server of go-sunspe ## Requirements - Go 1.26+ to build from source (not needed with the installer) -- [otfabric/go-sunspec](https://github.com/otfabric/go-sunspec) v0.10.2+ and [otfabric/go-modbus](https://github.com/otfabric/go-modbus) v1.15.1+ +- [otfabric/go-sunspec](https://github.com/otfabric/go-sunspec) v0.10.3+ and [otfabric/go-modbus](https://github.com/otfabric/go-modbus) v1.15.1+ ## Contributing diff --git a/RELEASE.md b/RELEASE.md index 1abdb07..0edd25f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,5 +1,19 @@ # sunspecctl Releases +## v0.7.3 + +**Date:** 2026-11-14 +**Previous release:** v0.7.2 + +No change to commands or output. + +### Changed + +- Built on go-sunspec v0.10.3 (was v0.10.2). Its library code is the same; it is built on go-modbus v1.15.1. +- CI: otfabric/engineering policy 1.6, the shared workflows v3.8.0, and one pull request workflow with a single required check. + +--- + ## v0.7.2 **Date:** 2026-11-13 diff --git a/go.mod b/go.mod index 0387e88..987b07a 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/otfabric/go-modbus v1.15.1 - github.com/otfabric/go-sunspec v0.10.2 + github.com/otfabric/go-sunspec v0.10.3 github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 ) diff --git a/go.sum b/go.sum index fbc43af..bdc272a 100644 --- a/go.sum +++ b/go.sum @@ -5,8 +5,8 @@ github.com/otfabric/go-modbus v1.15.1 h1:uQjS4xWjc2Pd6IDsBWj/MNGqRHfOMkKC1IHCJuA github.com/otfabric/go-modbus v1.15.1/go.mod h1:JF9zr+k/zgGilGDsDbS6pg33w8i9VPbFmaVpbnaHVzU= github.com/otfabric/go-serial v0.3.0 h1:HHklo8Ak76ffDUIv7Jd2A2ScAiI/wZhV1o8IWUj4ywA= github.com/otfabric/go-serial v0.3.0/go.mod h1:CGEz7RtffVDY/EBU8oN/ydSCjMOdtRpB0LNTc8BmSUQ= -github.com/otfabric/go-sunspec v0.10.2 h1:nRmxsb53V8/B7dc4qebpFYlanEJVSxc7CZopbdSVCMo= -github.com/otfabric/go-sunspec v0.10.2/go.mod h1:ZNYeTqmkFUwBug7KRBKte3QuxYReClhuOk/m2uU6hHg= +github.com/otfabric/go-sunspec v0.10.3 h1:wsabhxBBm6IZfwETpPekHsqG4pDlYse7Be26TlKxVJI= +github.com/otfabric/go-sunspec v0.10.3/go.mod h1:SSDhquy2Ad2bEWPQ+vRfk4IGDkSIcUDdakv8UmrgWLA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 h1:1EYB5IzjZawrrnELUi78f9fPu57HuXjmddZPjrls/28= github.com/santhosh-tekuri/jsonschema/v6 v6.0.3/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=