diff --git a/.github/workflows/gha-go-test.yml b/.github/workflows/go-checks.yml similarity index 83% rename from .github/workflows/gha-go-test.yml rename to .github/workflows/go-checks.yml index 1ff85f2c6..06a84f904 100644 --- a/.github/workflows/gha-go-test.yml +++ b/.github/workflows/go-checks.yml @@ -1,26 +1,37 @@ -name: Go tests -run-name: Running tests +name: Go checks + on: [push] + jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Set up Go uses: actions/setup-go@v5 with: go-version: 1.23 + + - name: Install dependencies + run: go mod download + + - name: Generate mocks + run: make generate + + - name: Run vet + run: make vet + - name: Run staticcheck env: SC_VERSION: "2024.1.1" run: | - make generate SC_URL="https://github.com/dominikh/go-tools/releases/download/$SC_VERSION/staticcheck_linux_amd64.tar.gz" wget -q ${SC_URL} -O - | tar -xzf - --strip-components 1 -C /usr/local/bin staticcheck/staticcheck make static - - name: Run vet - run: make vet + - name: Run tests + race condition check run: make race + - name: Check Go files are properly formatted run: test -z $(gofmt -l .)