diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml new file mode 100644 index 00000000000..e88cab125db --- /dev/null +++ b/.github/workflows/golangci-lint.yaml @@ -0,0 +1,26 @@ +name: golangci-lint + +on: [pull_request] + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + path: src/github.com/aws/amazon-ecs-agent + - name: GO_VERSION + run: | + cd $GITHUB_WORKSPACE/src/github.com/aws/amazon-ecs-agent + echo "GO_VERSION=$(cat GO_VERSION)" >> $GITHUB_ENV + - uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.42.1 + args: -v + skip-go-installation: true + only-new-issues: true \ No newline at end of file diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 527fb295a31..48066cdaeb0 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -27,4 +27,4 @@ jobs: export GO111MODULE=auto cd $GITHUB_WORKSPACE/src/github.com/aws/amazon-ecs-agent make test-silent - make analyze-cover-profile + make analyze-cover-profile \ No newline at end of file