docs: ADR-0041 — identity is the canonical PURL on typed graph nodes #1262
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build & Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: build-test-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 | |
| with: | |
| version: v2.13.2 | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: Run unit and integration tests | |
| run: make test | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: Build default Bomly binary | |
| run: go build -o /tmp/bomly ./cmd/bomly | |
| - name: Build lite Bomly binary | |
| run: go build -tags "bomly_external_syft,bomly_external_grype" -o /tmp/bomly-lite ./cmd/bomly | |
| format: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: Check Go formatting | |
| run: make fmt-check | |
| modules: | |
| name: Module drift | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: Check module metadata drift | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| go mod tidy | |
| git diff --exit-code -- go.mod go.sum | |
| - name: Forbid replace directives | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| replaces="$(go mod edit -json | jq '.Replace // [] | length')" | |
| if [ "${replaces}" != "0" ]; then | |
| echo "go.mod must not contain replace directives" >&2 | |
| go mod edit -json | jq '.Replace' >&2 | |
| exit 1 | |
| fi | |
| generated-docs: | |
| name: Generated docs drift | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: Regenerate documentation from the built binary | |
| run: make generate | |
| - name: Check generated docs drift | |
| run: git diff --exit-code -- docs/ | |
| docs-links: | |
| name: Docs link check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Check relative links and anchors in Markdown docs | |
| uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 | |
| with: | |
| args: --offline --include-fragments --no-progress 'docs/**/*.md' README.md CONTRIBUTING.md | |
| fail: true | |
| npm-wrapper: | |
| name: npm wrapper | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Test the bomly-mcp launcher and installer | |
| # No dependencies to install: the package is dependency-free and the | |
| # tests use node:test. BOMLY_MCP_SKIP_DOWNLOAD keeps CI from pulling a | |
| # ~90 MB release archive it does not need. | |
| env: | |
| BOMLY_MCP_SKIP_DOWNLOAD: "1" | |
| working-directory: npm | |
| run: npm test | |
| - name: Check the packed tarball is installable and self-consistent | |
| working-directory: npm | |
| run: | | |
| set -euo pipefail | |
| npm pack --dry-run | |
| node -e ' | |
| const pkg = require("./package.json"); | |
| const server = require("../server.json"); | |
| if (pkg.version !== server.version) { | |
| throw new Error(`npm/package.json ${pkg.version} != server.json ${server.version}`); | |
| } | |
| if (pkg.version !== server.packages[0].version) { | |
| throw new Error(`npm/package.json ${pkg.version} != server.json package ${server.packages[0].version}`); | |
| } | |
| if (pkg.mcpName !== server.name) { | |
| throw new Error(`mcpName ${pkg.mcpName} != server.json name ${server.name}`); | |
| } | |
| ' |