etcd/.github/workflows/static-analysis.yaml
Cenk Alti 66d37aaf1d
Setup golangci-lint GitHub action.
Part of "Enhance the static-analysis workflow" issue. #14164

Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2022-08-27 14:06:11 -04:00

34 lines
787 B
YAML

name: Static Analysis
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- linux-amd64-fmt
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.17.8"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.49.0
- run: date
- env:
TARGET: ${{ matrix.target }}
run: |
echo "${TARGET}"
case "${TARGET}" in
linux-amd64-fmt)
GOARCH=amd64 PASSES='fmt bom dep' ./scripts/test.sh
;;
*)
echo "Failed to find target"
exit 1
;;
esac