diff options
| author | Smoke <[email protected]> | 2024-01-23 11:01:12 -1000 |
|---|---|---|
| committer | Smoke <[email protected]> | 2024-01-23 11:01:12 -1000 |
| commit | 544ce9ea86cd9454e5f83cf378bd7e3531cd73d0 (patch) | |
| tree | 732a6ffddca947635aa4f4dc2c3741d8dba4079f | |
| parent | d193d5c61a034bdf9f1943427a05d9242fdb07ce (diff) | |
run linters before test
| -rw-r--r-- | .github/workflows/build-and-test.yaml | 42 |
1 files changed, 28 insertions, 14 deletions
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/[email protected] + 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/[email protected] - with: - install-go: false - version: "latest"
\ No newline at end of file + run: go test -v ./...
\ No newline at end of file |
