diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml deleted file mode 100644 index dc5912ef..00000000 --- a/.github/workflows/actions.yaml +++ /dev/null @@ -1,51 +0,0 @@ -name: Workflow -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] -jobs: - code-check: - name: Check Go formatting, linting, vetting - runs-on: ubuntu-latest - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - name: Run the formatter, linter, and vetter - uses: dell/common-github-actions/go-code-formatter-linter-vetter@main - with: - directories: ./... - test: - name: Run Go unit tests and check package coverage - runs-on: ubuntu-latest - steps: - - name: Checkout csi-unity - uses: actions/checkout@v4 - - name: Run unit tests and check package coverage - uses: dell/common-github-actions/go-code-tester@main - with: - threshold: 20 - test-folder: "./service/utils" - race-detector: "true" - go_security_scan: - name: Run gosec - runs-on: ubuntu-latest - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - name: Run gosec to check for security vulnerabilities - uses: dell/common-github-actions/gosec-runner@main - with: - directories: "./..." - excludes: "G108,G402,G307" - malware_security_scan: - name: Malware Scanner - runs-on: ubuntu-latest - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - name: Run malware scan - uses: dell/common-github-actions/malware-scanner@main - with: - directories: . - options: -ri diff --git a/.github/workflows/common-workflows.yaml b/.github/workflows/common-workflows.yaml new file mode 100644 index 00000000..05e4e078 --- /dev/null +++ b/.github/workflows/common-workflows.yaml @@ -0,0 +1,17 @@ +name: Common Workflows +on: # yamllint disable-line rule:truthy + push: + branches: [main] + pull_request: + branches: ["**"] + +jobs: + + # golang static analysis checks + go-static-analysis: + uses: dell/common-github-actions/.github/workflows/go-static-analysis.yaml@main + name: Golang Validation + + common: + name: Quality Checks + uses: dell/common-github-actions/.github/workflows/go-common.yml@main diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml deleted file mode 100644 index d17a59ea..00000000 --- a/.github/workflows/linters.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: linters - -on: - push: - branches: [main] - pull_request: - branches: ["**"] - -permissions: - contents: read - -jobs: - golangci-lint: - name: golangci-lint - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - cache: false - - name: Checkout the code - uses: actions/checkout@v4 - - name: Vendor packages - run: | - go mod vendor - - name: golangci-lint - uses: golangci/golangci-lint-action@v5 - with: - version: latest - skip-cache: true - args: --out-format=colored-line-number diff --git a/.golangci.yaml b/.golangci.yaml deleted file mode 100644 index 56f53324..00000000 --- a/.golangci.yaml +++ /dev/null @@ -1,30 +0,0 @@ -run: - timeout: 20m - issue-exit-code: 0 # we will change this later - tests: true - skip-dirs-use-default: true - modules-download-mode: readonly - -issues: - max-issues-per-linter: 0 - max-same-issues: 0 - new: false - -output: - print-linter-name: true - sort-results: true - uniq-by-line: false - print-issued-lines: true - -linters: - disable-all: true - fast: false - enable: - # A stricter replacement for gofmt. - - gofumpt - # Inspects source code for security problems. - - gosec - # Check for correctness of programs. - - govet - # Drop-in replacement of golint. - - revive