aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-and-test.yaml42
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