MCPcopy
hub / github.com/ossf/scorecard / TestIsPackagingWorkflow

Function TestIsPackagingWorkflow

checks/fileparser/github_workflow_test.go:904–1027  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

902}
903
904func TestIsPackagingWorkflow(t *testing.T) {
905 t.Parallel()
906
907 tests := []struct {
908 name string
909 filename string
910 expected bool
911 }{
912 {
913 name: "npmjs.org publish",
914 filename: "../testdata/.github/workflows/github-workflow-packaging-npm.yaml",
915 expected: true,
916 },
917 {
918 name: "npm github publish",
919 filename: "../testdata/.github/workflows/github-workflow-packaging-npm-github.yaml",
920 expected: false, // Should this be false?
921 },
922 {
923 name: "maven publish",
924 filename: "../testdata/.github/workflows/github-workflow-packaging-maven.yaml",
925 expected: true,
926 },
927 {
928 name: "maven publish multi-line",
929 filename: "../testdata/.github/workflows/github-workflow-packaging-maven-multi-line.yaml",
930 expected: true,
931 },
932 {
933 name: "gradle publish",
934 filename: "../testdata/.github/workflows/github-workflow-packaging-gradle.yaml",
935 expected: true,
936 },
937 {
938 name: "sbt ci-release",
939 filename: "../testdata/.github/workflows/github-workflow-packaging-sbt-ci-release.yaml",
940 expected: true,
941 },
942 {
943 name: "gem publish",
944 filename: "../testdata/.github/workflows/github-workflow-packaging-gem.yaml",
945 expected: true,
946 },
947 {
948 name: "nuget publish",
949 filename: "../testdata/.github/workflows/github-workflow-packaging-nuget.yaml",
950 expected: true,
951 },
952 {
953 name: "docker action publish",
954 filename: "../testdata/.github/workflows/github-workflow-packaging-docker-action.yaml",
955 expected: true,
956 },
957 {
958 name: "docker push publish",
959 filename: "../testdata/.github/workflows/github-workflow-packaging-docker-push.yaml",
960 expected: true,
961 },

Callers

nothing calls this directly

Calls 2

IsPackagingWorkflowFunction · 0.85
RunMethod · 0.65

Tested by

no test coverage detected