From 6785aefdf1363b2ad878b6fa0eb62f143f03084c Mon Sep 17 00:00:00 2001 From: Matthias Diester Date: Tue, 18 Jan 2022 17:18:28 +0100 Subject: [PATCH] Simplify Build and Test GitHub Action Move spell checking into separate GitHub Action. Remove linter and checks from Build and Test GitHub Action. --- .github/workflows/build.yml | 25 ++++++------------------- .github/workflows/misspell.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/misspell.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 76f00803..228bc070 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,12 +4,12 @@ name: Build and Tests on: push: tags-ignore: - - '**' + - '**' branches: - - main + - main pull_request: branches: - - main + - main jobs: build: @@ -32,24 +32,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Install Tools - run: | - go install github.com/gordonklaus/ineffassign@latest - go install golang.org/x/lint/golint@latest - go install github.com/client9/misspell/cmd/misspell@latest - go install honnef.co/go/tools/cmd/staticcheck@latest - go install github.com/onsi/ginkgo/ginkgo@latest - - - run: go build ./... - - run: go vet ./... - - run: ineffassign ./... - - run: golint ./... - - run: find . -type f | xargs misspell -source=text -error - - run: staticcheck ./... + - name: Install Ginkgo + run: go install github.com/onsi/ginkgo/ginkgo@latest - name: Run Go Unit Tests - run: | - ginkgo -r -randomizeAllSpecs -randomizeSuites -failOnPending -nodes=4 -compilers=2 -race -trace -cover + run: ginkgo -r -randomizeAllSpecs -randomizeSuites -failOnPending -nodes=4 -compilers=2 -race -trace -cover - name: Upload Code Coverage Profile uses: codecov/codecov-action@v1 diff --git a/.github/workflows/misspell.yml b/.github/workflows/misspell.yml new file mode 100644 index 00000000..abd3be93 --- /dev/null +++ b/.github/workflows/misspell.yml @@ -0,0 +1,32 @@ +--- +name: Spell check + +on: + push: + tags-ignore: + - '**' + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + misspell: + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17.x + + - name: Check out code + uses: actions/checkout@v2 + + - name: Install Tool + run: go install github.com/client9/misspell/cmd/misspell@latest + + - run: find . -type f | xargs misspell -source=text -error