2025-05-10 01:16:42 -04:00
|
|
|
name: "donotpassgo"
|
2026-04-03 00:22:36 -04:00
|
|
|
description: "go security checks and unit tests"
|
2025-05-17 15:47:24 +00:00
|
|
|
inputs:
|
2026-04-03 00:22:36 -04:00
|
|
|
test-library: #TEST_LIBRARY
|
|
|
|
|
description: "if set, tests are run with the specific library (standard|ginkgo)"
|
2025-05-17 15:47:24 +00:00
|
|
|
required: false
|
|
|
|
|
default: "none"
|
2026-04-03 00:22:36 -04:00
|
|
|
test-version: #TEST_VERSION
|
2026-04-03 00:27:33 -04:00
|
|
|
description: "the test library version, if the library is none or standard this value is ignored"
|
2026-04-03 00:22:36 -04:00
|
|
|
required: false
|
|
|
|
|
default: "latest"
|
|
|
|
|
test-fail: #TEST_FAIL
|
|
|
|
|
description: "override switch to prevent jobs from failing when unit tests do"
|
|
|
|
|
required: false
|
|
|
|
|
default: "yes"
|
|
|
|
|
static: #STATIC_FLAG
|
|
|
|
|
description: "if set, static code checks are ran with gosec (yes|no)"
|
|
|
|
|
required: false
|
|
|
|
|
default: "yes"
|
|
|
|
|
static-fail: #STATIC_FAIL
|
|
|
|
|
description: "override switch to prevent jobs from failing when static code analysis does"
|
|
|
|
|
required: false
|
|
|
|
|
default: "yes"
|
|
|
|
|
vulnerability: #VULN_CHECK
|
|
|
|
|
description: "if set, dependencies are scanned with govulncheck (yes|no)"
|
|
|
|
|
required: false
|
|
|
|
|
default: "yes"
|
|
|
|
|
vulnerability-fail: #VULN_FAIL
|
|
|
|
|
description: "override switch to prevent jobs from failing when vulnerability scan does"
|
|
|
|
|
required: false
|
|
|
|
|
default: "yes"
|
|
|
|
|
|
2025-05-10 01:16:42 -04:00
|
|
|
runs:
|
|
|
|
|
using: "composite"
|
|
|
|
|
steps:
|
2026-04-03 00:22:36 -04:00
|
|
|
- name: "install dependencies"
|
2025-05-17 15:47:24 +00:00
|
|
|
shell: bash
|
2026-04-03 00:22:36 -04:00
|
|
|
run: ${{ github.action_path }}/src/install.sh
|
2026-04-03 00:27:33 -04:00
|
|
|
env:
|
|
|
|
|
TEST_LIBRARY: ${{ inputs.test-library }}
|
|
|
|
|
TEST_VERSION: ${{ inputs.test-version }}
|
2025-05-17 15:47:24 +00:00
|
|
|
|
2026-04-03 00:22:36 -04:00
|
|
|
- name: "run unit tests"
|
|
|
|
|
shell: bash
|
|
|
|
|
run: ${{ github.action_path }}/src/test.sh
|
2026-04-03 00:27:33 -04:00
|
|
|
env:
|
|
|
|
|
TEST_LIBRARY: ${{ inputs.test-library }}
|
|
|
|
|
TEST_FAIL: ${{ inputs.test-fail }}
|
2025-05-10 01:29:37 -04:00
|
|
|
|
2026-04-03 00:22:36 -04:00
|
|
|
- name: "run security checks"
|
|
|
|
|
shell: bash
|
2026-04-03 15:11:33 -04:00
|
|
|
run: ${{ github.action_path }}/src/security.sh
|
|
|
|
|
env:
|
|
|
|
|
STATIC_FLAG: ${{ inputs.static }}
|
|
|
|
|
STATIC_FAIL: ${{ inputs.static-fail }}
|
|
|
|
|
VULN_CHECK: ${{ inputs.vulnerability }}
|
|
|
|
|
VULN_FAIL: ${{ inputs.vulnerability-fail }}
|