Skip to content

Commit 37b7499

Browse files
committed
Changed codecov, and added race test and changed message failing to parse data
1 parent 9ffa2a9 commit 37b7499

File tree

3 files changed

+34
-24
lines changed

3 files changed

+34
-24
lines changed

.github/workflows/race-test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Race Detection Tests
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
test:
9+
name: Race Detector
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
- name: Set up Go
15+
uses: actions/setup-go@v4
16+
with:
17+
go-version: '1.21'
18+
- name: Run race detector
19+
run: |
20+
go test -race -covermode=atomic ./...

.github/workflows/test-coverage.yml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,24 @@
11
name: Test and Coverage
2-
32
on:
43
push:
54
branches: [ main ]
65
pull_request:
76
branches: [ main ]
8-
97
jobs:
108
test:
119
name: Test and Coverage
1210
runs-on: ubuntu-latest
13-
1411
steps:
15-
- name: Checkout code
16-
uses: actions/checkout@v3
17-
18-
- name: Set up Go
19-
uses: actions/setup-go@v4
20-
with:
21-
go-version: '1.21'
22-
23-
- name: Run tests with coverage
24-
run: |
25-
go test -race -coverprofile=coverage.out -covermode=atomic ./...
26-
27-
- name: Upload coverage to Codecov
28-
uses: codecov/codecov-action@v3
29-
with:
30-
files: ./coverage.out
31-
flags: unittests
32-
name: codecov-umbrella
33-
fail_ci_if_error: false
34-
verbose: true
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
- name: Set up Go
15+
uses: actions/setup-go@v4
16+
with:
17+
go-version: '1.21'
18+
- name: Run tests with coverage
19+
run: |
20+
go test -coverprofile=coverage.txt
21+
- name: Upload coverage reports to Codecov
22+
uses: codecov/codecov-action@v5
23+
with:
24+
token: ${{ secrets.CODECOV_TOKEN }}

settingo/strings_operations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func ParseLineToMap(s string) map[string][]string {
2828
for _, item := range items {
2929
key, values, err := parseKeyValue(item)
3030
if err {
31-
fmt.Println("Unable to parse line, discarded:", item)
31+
fmt.Println("Settingo: Unable to parse line, discarded:", item)
3232
continue
3333
}
3434
parsed[key] = values

0 commit comments

Comments
 (0)