From 3707a5e4bf76e51bf15bc9f7c3877171ba925f1a Mon Sep 17 00:00:00 2001 From: Ivar Derksen Date: Wed, 2 Feb 2022 12:05:50 +0100 Subject: [PATCH] Added GitHub Actions workflow for status checks --- .github/workflows/status-checks.yml | 51 +++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/status-checks.yml diff --git a/.github/workflows/status-checks.yml b/.github/workflows/status-checks.yml new file mode 100644 index 0000000..b5639bb --- /dev/null +++ b/.github/workflows/status-checks.yml @@ -0,0 +1,51 @@ +# Workflow to check whether changes to master fulfill all requirements. +name: Status checks + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Build + run: go build -v -o uniqueid-issuer-linux-amd64 + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Run gofmt + run: gofmt -d -e . + + - name: Run go vet + run: go vet ./... + + - name: Install ineffassign + run: go install github.com/gordonklaus/ineffassign@latest + + - name: Run ineffassign + run: ineffassign ./... + + - name: Install misspell + run: go install github.com/client9/misspell/cmd/misspell@latest + + - name: Run misspell + run: misspell -error .