Skip to content

Commit 37f1f8d

Browse files
committed
ci/circleci: use parallelism for test with both of gojay tag and not
1 parent a395a25 commit 37f1f8d

File tree

4 files changed

+43
-9
lines changed

4 files changed

+43
-9
lines changed

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ defaults: &defaults
1515
jobs:
1616
test:
1717
<<: *defaults
18+
parallelism: 2
1819
steps:
1920
- checkout
20-
- golang/gomod:
21-
file: "go.mod"
21+
- golang/gomod
2222
- run:
2323
name: Test and collect coverages
2424
command: |
25-
make coverage/ci
25+
make $(circleci tests split .circleci/coverage-targets)
2626
- codecov/upload:
2727
file: "/tmp/ci/artifacts/coverage.out"
28+
flags: $(if [ $CIRCLE_NODE_INDEX == 0 ]; then echo "json"; else echo "gojay"; fi)
2829
- store_artifacts:
2930
path: /tmp/ci/artifacts
3031
- store_artifacts:
@@ -36,8 +37,7 @@ jobs:
3637
<<: *defaults
3738
steps:
3839
- checkout
39-
- golang/gomod:
40-
file: "go.mod"
40+
- golang/gomod
4141
- run:
4242
name: Run lint for sources
4343
command: |

.circleci/coverage-targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
coverage/ci
2+
coverage/ci/gojay

.codecov.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,47 @@
11
coverage:
2-
precision: 2
2+
precision: 1
33
round: down
44
range: "70...100"
55

66
status:
77
project:
8-
default:
8+
default: off
9+
json:
10+
flags: json
911
target: auto
1012
threshold: 10%
13+
if_not_found: success
14+
if_ci_failed: error
15+
gojay:
16+
flags: gojay
17+
target: auto
18+
threshold: 10%
19+
if_not_found: success
20+
if_ci_failed: error
1121
patch:
12-
default:
22+
default: off
23+
json:
24+
flags: json
25+
only_pulls: true
26+
target: 50%
27+
threshold: 10%
28+
gojay:
29+
flags: gojay
1330
only_pulls: true
1431
target: 50%
1532
threshold: 10%
33+
changes: false
1634
ignore:
17-
- "internal/cmd"
1835
- "vendor"
1936

37+
flags:
38+
json:
39+
paths:
40+
- /
41+
gojay:
42+
paths:
43+
- /
44+
2045
comment:
2146
behavior: default
2247
require_changes: true

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@ include hack/make/go.mk
1313

1414
# ----------------------------------------------------------------------------
1515
# overlays
16+
17+
test/gojay: GO_BUILDTAGS+=gojay
18+
test/gojay: test
19+
20+
coverage/ci/gojay: GO_BUILDTAGS+=gojay
21+
coverage/ci/gojay: coverage/ci
22+
$(call target)

0 commit comments

Comments
 (0)