Skip to content

Commit 7dc6c81

Browse files
authored
Update go.yml
1 parent b3593b9 commit 7dc6c81

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

.github/workflows/go.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ env:
1919
jobs:
2020
lint:
2121
name: Lint
22+
concurrency:
23+
group: ${{ github.workflow }}-lint-${{ github.ref }}
24+
cancel-in-progress: true
2225
runs-on: ubuntu-latest
2326
steps:
2427
- name: Checkout code
2528
uses: actions/checkout@v4
2629
- name: Install Go
27-
uses: actions/setup-go@v5
30+
uses: actions/setup-go@v4
2831
with:
29-
go-version: 1.22.x
32+
go-version: 1.23.x
3033
- name: Check Go module tidiness
3134
shell: bash
3235
run: |
@@ -48,15 +51,29 @@ jobs:
4851
name: Test
4952
strategy:
5053
matrix:
51-
go-version: [ 1.21.x, 1.22.x ]
54+
go-version: [ 1.22.x, 1.23.x ]
5255
platform: [ ubuntu-latest, macos-latest, windows-latest ]
5356
runs-on: ${{ matrix.platform }}
5457
steps:
58+
- name: Checkout code
59+
uses: actions/checkout@v4
5560
- name: Install Go
5661
uses: actions/setup-go@v5
5762
with:
5863
go-version: ${{ matrix.go-version }}
59-
- name: Checkout code
60-
uses: actions/checkout@v4
6164
- name: Run tests with coverage
62-
run: go test -v -race -coverprofile=coverage -covermode=atomic ./...
65+
continue-on-error: true
66+
run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic -json ./... > test-report.json
67+
env:
68+
PGPORT: 5432
69+
PGHOST: localhost
70+
PGUSER: postgres
71+
PGPASSWORD: postgres
72+
PGDATABASE: postgres
73+
PGSSLMODE: disable
74+
REDIS_HOST: localhost
75+
REDIS_PORT: 6379
76+
- name: Analyze test report
77+
run: |
78+
go install github.com/mfridman/tparse@latest
79+
tparse -all -file=test-report.json

0 commit comments

Comments
 (0)