Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 12 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,18 @@
name: Build & Test
name: Go CI

on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
pull_request:
push:
branches:
- main

permissions: read-all

jobs:
build:
name: 🧩 Build & Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: 'go.mod'
cache: true

- name: Install Dependencies
run: go mod download

- name: Build
run: |
go version
go build -o bin/sbom-validator-example example/main.go

- name: Run Tests
run: |
go test -v -coverprofile=coverage.out ./...
go tool cover -func=coverage.out

- name: Upload Coverage Report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-report
path: coverage.out

- name: Add Job Summary
run: |
echo "### ✅ Build & Test Completed" >> $GITHUB_STEP_SUMMARY
echo "- ✅ Unit tests passed successfully" >> $GITHUB_STEP_SUMMARY
echo "- 📊 Coverage Summary:" >> $GITHUB_STEP_SUMMARY
go tool cover -func=coverage.out | tail -n 1 >> $GITHUB_STEP_SUMMARY
uses: shiftleftcyber/supply-chain-workflows/.github/workflows/go-ci.yml@08214ced07c278eaed1c68fa459916e07f071553
with:
coverage-artifact-name: coverage-report
go-version-file: go.mod
working-directory: .
33 changes: 0 additions & 33 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

39 changes: 11 additions & 28 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,18 @@
name: golangci-lint
name: Go Lint

on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
pull_request:
push:
branches:
- main

permissions:
contents: read
permissions: read-all

jobs:
lint:
name: 🔍 Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: 'go.mod'
cache: true

- name: Install Dependencies
run: go mod download

- name: Run golangci-lint
uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1
with:
version: v2.8

- name: Add Job Summary
run: |
echo "### 🔍 Lint Results" >> $GITHUB_STEP_SUMMARY
echo "- ✅ Code linting completed successfully" >> $GITHUB_STEP_SUMMARY
uses: shiftleftcyber/supply-chain-workflows/.github/workflows/go-lint.yml@08214ced07c278eaed1c68fa459916e07f071553
with:
go-version-file: go.mod
golangci-lint-version: v2.8.0
working-directory: .
16 changes: 0 additions & 16 deletions .github/workflows/osv-scanner-pr.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/osv-scanner-schedule.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Go Security

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
schedule:
- cron: "30 12 * * 1"

permissions:
contents: read
security-events: write

jobs:
security:
uses: shiftleftcyber/supply-chain-workflows/.github/workflows/security-go.yml@d175f38df5c7934cadbc5a9024d21bce9ac55530
with:
go-version-file: go.mod
working-directory: .
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/shiftleftcyber/sbom-validator/v2

go 1.25.7
go 1.25.13

require github.com/xeipuuv/gojsonschema v1.2.0

Expand Down
Loading