Skip to content

Migrate workflow-plugin-agent to strict plugin contract descriptors #81

Migrate workflow-plugin-agent to strict plugin contract descriptors

Migrate workflow-plugin-agent to strict plugin contract descriptors #81

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
GONOSUMCHECK: github.com/GoCodeAlone/*
GONOSUMDB: github.com/GoCodeAlone/*
GOPRIVATE: github.com/GoCodeAlone/*
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Configure git for private modules
run: git config --global url."https://${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: go vet
run: go vet ./...
- name: go test
run: go test -race ./...
validate-contracts:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Configure git for private modules
run: git config --global url."https://${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Check plugin.json exists
run: |
test -f plugin.json || { echo "ERROR: plugin.json is missing — every Workflow plugin must ship a manifest"; exit 1; }
- name: Validate strict plugin contracts
run: go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.20.1 plugin validate --file plugin.json --strict-contracts
- name: Validate contract descriptor coverage (go test)
run: go test -run 'TestAgentPluginStepSchemas|TestAgentPluginModuleSchemas|TestAgentPluginManifestStepSchemas|TestPluginJSONCanonicalFormat' -v .