Skip to content

Commit f999c61

Browse files
Check for tx.Error on every operation on Tx (#31)
- Check for tx.Error before calling tx.Commit() - Call defer tx.Rollback() which is no-op if tx.Commit() succeeds, the tx will not be rolled back - Fix all tests to use independent dbs to avoid conflicts - Update gomarkdoc version to enable links for pkg references - Update golang to 1.19 version and pin it in github workflow
1 parent a2fef6f commit f999c61

File tree

16 files changed

+691
-349
lines changed

16 files changed

+691
-349
lines changed

.github/workflows/daily.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,30 @@
22
name: Daily
33
on:
44
schedule:
5-
- cron: "0 6 * * *"
5+
- cron: "0 6 * * *"
6+
workflow_dispatch:
7+
inputs:
8+
logLevel:
9+
description: 'Log level'
10+
required: true
11+
default: 'trace'
612

713
jobs:
814
test:
915
name: Unit test
1016
runs-on: [ubuntu-latest]
1117
steps:
1218
- uses: actions/checkout@v3
13-
- name: Set up Go using version from go.mod
14-
uses: actions/setup-go@v3
19+
- name: Set up Go using version for latest 1.19 version
20+
uses: actions/setup-go@v4
1521
with:
16-
go-version-file: 'go.mod'
17-
22+
go-version: '1.19'
23+
check-latest: true
1824
- name: Run unit tests
1925
run: |
2026
mkdir -p $(go env GOPATH)
2127
mkdir -p $(go env GOCACHE)
22-
sudo make test
28+
sudo make test benchmarks
2329
- name: Codecov
2430
uses: codecov/codecov-action@v3
2531
with:
@@ -33,10 +39,11 @@ jobs:
3339
runs-on: [ubuntu-latest]
3440
steps:
3541
- uses: actions/checkout@v3
36-
- name: Set up Go using version from go.mod
37-
uses: actions/setup-go@v3
42+
- name: Set up Go using version for latest 1.19 version
43+
uses: actions/setup-go@v4
3844
with:
39-
go-version-file: 'go.mod'
45+
go-version: '1.19'
46+
check-latest: true
4047
- name: Run lint
4148
run: |
4249
mkdir -p $(go env GOPATH)

.github/workflows/go.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,24 @@ on:
1515
workflows: ["Build"]
1616
types:
1717
- complete
18+
workflow_dispatch:
19+
inputs:
20+
logLevel:
21+
description: 'Log level'
22+
required: true
23+
default: 'warning'
1824

1925
jobs:
2026
test:
2127
name: Unit test
2228
runs-on: [ubuntu-latest]
2329
steps:
2430
- uses: actions/checkout@v3
25-
- name: Set up Go using version from go.mod
26-
uses: actions/setup-go@v3
31+
- name: Set up Go using version for latest 1.19 version
32+
uses: actions/setup-go@v4
2733
with:
28-
go-version-file: 'go.mod'
34+
go-version: '1.19'
35+
check-latest: true
2936

3037
- name: Run unit tests
3138
run: |
@@ -45,10 +52,11 @@ jobs:
4552
runs-on: [ubuntu-latest]
4653
steps:
4754
- uses: actions/checkout@v3
48-
- name: Set up Go using version from go.mod
49-
uses: actions/setup-go@v3
55+
- name: Set up Go using version for latest 1.19 version
56+
uses: actions/setup-go@v4
5057
with:
51-
go-version-file: 'go.mod'
58+
go-version: '1.19'
59+
check-latest: true
5260
- name: Run lint
5361
run: |
5462
mkdir -p $(go env GOPATH)

build/install_tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -eux
44
source $(dirname "$0")/env.sh
55

66
GOLNT_VERSION=v1.50.1
7-
GOMRK_VERSION=v0.4.1
7+
GOMRK_VERSION=v0.4.2-0.20230402163522-cc78abbcb570
88
SHFMT_VERSION=v3.6.0
99
TYPOS_VERSION=1.13.6
1010

0 commit comments

Comments
 (0)