From e524e398423f8aea2961302287123085dcc5a524 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 4 Jan 2022 11:03:29 +1100 Subject: move lint into ci yaml --- .github/workflows/ci.yml | 15 +++++++++++++++ .github/workflows/lint.yml | 20 -------------------- 2 files changed, 15 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/lint.yml (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa6bfb1e4..efa898bc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,3 +85,18 @@ jobs: - name: Check Cheatsheet run: | go run scripts/cheatsheet/main.go check + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Lint + uses: golangci/golangci-lint-action@v2 + with: + version: latest + - name: Format code + run: | + if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then + find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \; + exit 1 + fi diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 08e339d8d..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Lint - -on: pull_request - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Lint - uses: golangci/golangci-lint-action@v2 - with: - version: latest - - name: Format code - run: | - if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then - find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \; - exit 1 - fi -- cgit v1.2.3