Adding ci #28
This file contains 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: Go-static-analysis | |
on: [push, pull_request] | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
cache: false | |
- name: Install golangci-lint | |
run: go install github.com/golangci/golangci-lint/cmd/[email protected] | |
- name: Get module list | |
run: | | |
modules=$(find . -name 'go.mod' -exec dirname {} \;) | |
- name: Run golangci-lint | |
run: | | |
for module in $modules; do | |
echo "Running golangci-lint on module: $module" | |
golangci-lint run $module/... | |
done | |
env: | |
GO111MODULE: on | |
shellcheck: | |
name: Shellcheck | |
runs-on: ubuntu-latest | |
env: | |
SHELLCHECK_OPTS: -e SC3037 # disabled because of false issue in entrypoint.sh | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run ShellCheck | |
uses: ludeeus/action-shellcheck@master | |
hadolint: | |
runs-on: ubuntu-latest | |
name: Hadolint | |
env: | |
HADOLINT_RECURSIVE: "true" | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0 | |
name: Run Hadolint | |
with: | |
recursive: true | |
ignore: DL3008,DL3059,DL3015,DL3018 |