From 544ce9ea86cd9454e5f83cf378bd7e3531cd73d0 Mon Sep 17 00:00:00 2001 From: Smoke <86024507+crypto-smoke@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:01:12 -1000 Subject: run linters before test --- .github/workflows/build-and-test.yaml | 42 +++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 14 deletions(-) (limited to '.github') diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 636b847..ae93c55 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -9,6 +9,31 @@ on: - master jobs: + lint: + name: Run linter before doing anything + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21.6 + cache: false + + - name: Vet + run: go vet ./... + + - name: Check for CRLF endings + uses: erclu/check-crlf@v1 + + - name: Staticcheck + uses: dominikh/staticcheck-action@v1.3.0 + with: + install-go: false + version: "latest" + test-nocache: strategy: matrix: @@ -16,7 +41,8 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} - name: lint, test, and build + name: test + needs: lint steps: - name: Check out code into the Go module directory uses: actions/checkout@v3 @@ -27,17 +53,5 @@ jobs: go-version: 1.21.6 cache: false - - name: Check for CRLF endings - uses: erclu/check-crlf@v1 - - name: All tests - run: go test -v ./... - - - name: Vet - run: go vet ./... - - - name: Staticcheck - uses: dominikh/staticcheck-action@v1.3.0 - with: - install-go: false - version: "latest" \ No newline at end of file + run: go test -v ./... \ No newline at end of file -- cgit v1.2.3