Skip to content

Commit 7fb92b5

Browse files
authored
Merge branch 'master' into 2016/day03
2 parents 327b952 + d709ed6 commit 7fb92b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+914
-314
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
## Our Pledge
32

43
We as members, contributors, and leaders pledge to make participation in our
@@ -105,7 +104,7 @@ Violating these terms may lead to a permanent ban.
105104
### 4. Permanent Ban
106105

107106
**Community Impact**: Demonstrating a pattern of violation of community
108-
standards, including sustained inappropriate behavior, harassment of an
107+
standards, including sustained inappropriate behavior, harassment of an
109108
individual, or aggression toward or disparagement of classes of individuals.
110109

111110
**Consequence**: A permanent ban from any sort of public interaction within

.github/CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Contributing
22

3-
By participating to this project, you agree to abide [code of conduct](https://github.com/obalunenko/advent-of-code/blob/master/.github/CODE_OF_CONDUCT.md).
3+
By participating to this project, you agree to
4+
abide [code of conduct](https://github.com/obalunenko/advent-of-code/blob/master/.github/CODE_OF_CONDUCT.md).
45

56
Please note that I'll not accept any PR with new puzzle solutions - I don't like spoilers.
67

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ updates:
1313
commit-message:
1414
prefix: "chore"
1515
include: "scope"
16-
16+
1717
- package-ecosystem: "github-actions"
1818
directory: "/"
1919
schedule:

.github/workflows/go.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
max-parallel: 3
4242
matrix:
4343
os: [ 'ubuntu-22.04' ]
44-
go: [ '1.19' ]
44+
go: [ '1.20' ]
4545
runs-on: ${{ matrix.os }}
4646
name: Build
4747
steps:
@@ -93,7 +93,7 @@ jobs:
9393
max-parallel: 2
9494
matrix:
9595
os: [ 'ubuntu-22.04' ]
96-
go: [ '1.19' ]
96+
go: [ '1.20' ]
9797
runs-on: ${{ matrix.os }}
9898
name: Run Tests
9999
steps:
@@ -140,7 +140,7 @@ jobs:
140140
max-parallel: 2
141141
matrix:
142142
os: [ 'ubuntu-22.04' ]
143-
go: [ '1.19' ]
143+
go: [ '1.20' ]
144144
runs-on: ${{ matrix.os }}
145145
name: Run linters
146146
steps:
@@ -186,13 +186,13 @@ jobs:
186186
shell: bash
187187

188188
reports:
189-
needs: [testing, linting, build]
189+
needs: [ testing, linting, build ]
190190
strategy:
191191
fail-fast: true
192192
max-parallel: 1
193193
matrix:
194194
os: [ 'ubuntu-22.04' ]
195-
go: [ '1.19' ]
195+
go: [ '1.20' ]
196196
runs-on: ${{ matrix.os }}
197197
name: Quality reports
198198
steps:
@@ -227,14 +227,9 @@ jobs:
227227
make install-tools
228228
shell: bash
229229

230-
- name: Prepare test coverage
230+
- name: Prepare test coverage and reports
231231
run: |
232-
make test-cover
233-
shell: bash
234-
235-
- name: Tests report
236-
run: |
237-
make test-sonar-report
232+
make prepare-cover-report
238233
shell: bash
239234

240235
- name: Prepare lint report

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
max-parallel: 2
1515
matrix:
1616
os: [ 'ubuntu-22.04' ]
17-
go: [ '1.19' ]
17+
go: [ '1.20' ]
1818
runs-on: ${{ matrix.os }}
1919
name: Build
2020
steps:
@@ -60,7 +60,7 @@ jobs:
6060
max-parallel: 2
6161
matrix:
6262
os: [ 'ubuntu-22.04' ]
63-
go: [ '1.19' ]
63+
go: [ '1.20' ]
6464
runs-on: ${{ matrix.os }}
6565
name: Regression tests
6666
steps:
@@ -109,7 +109,7 @@ jobs:
109109
max-parallel: 1
110110
matrix:
111111
os: [ 'ubuntu-22.04' ]
112-
go: [ '1.19' ]
112+
go: [ '1.20' ]
113113
runs-on: ${{ matrix.os }}
114114
name: Lint
115115
steps:
@@ -156,13 +156,13 @@ jobs:
156156
shell: bash
157157

158158
release:
159-
needs: [build, regression_test, linting]
159+
needs: [ build, regression_test, linting ]
160160
strategy:
161161
fail-fast: false
162162
max-parallel: 1
163163
matrix:
164164
os: [ 'ubuntu-22.04' ]
165-
go: [ '1.19' ]
165+
go: [ '1.20' ]
166166
runs-on: ${{ matrix.os }}
167167
name: Release
168168
steps:

.golangci.pipe.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,29 +70,29 @@ issues:
7070
fix: false
7171

7272
severity:
73-
# Default value is empty string.
74-
# Set the default severity for issues. If severity rules are defined and the issues
75-
# do not match or no severity is provided to the rule this will be the default
76-
# severity applied. Severities should match the supported severity names of the
77-
# selected out format.
78-
# - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
79-
# - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity
80-
# - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
81-
default-severity: error
82-
83-
# The default value is false.
84-
# If set to true severity-rules regular expressions become case sensitive.
85-
case-sensitive: false
86-
87-
# Default value is empty list.
88-
# When a list of severity rules are provided, severity information will be added to lint
89-
# issues. Severity rules have the same filtering capability as exclude rules except you
90-
# are allowed to specify one matcher per severity rule.
91-
# Only affects out formats that support setting severity information.
92-
rules:
93-
- linters:
94-
- dupl
95-
severity: warning
73+
# Default value is empty string.
74+
# Set the default severity for issues. If severity rules are defined and the issues
75+
# do not match or no severity is provided to the rule this will be the default
76+
# severity applied. Severities should match the supported severity names of the
77+
# selected out format.
78+
# - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
79+
# - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity
80+
# - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
81+
default-severity: error
82+
83+
# The default value is false.
84+
# If set to true severity-rules regular expressions become case sensitive.
85+
case-sensitive: false
86+
87+
# Default value is empty list.
88+
# When a list of severity rules are provided, severity information will be added to lint
89+
# issues. Severity rules have the same filtering capability as exclude rules except you
90+
# are allowed to specify one matcher per severity rule.
91+
# Only affects out formats that support setting severity information.
92+
rules:
93+
- linters:
94+
- dupl
95+
severity: warning
9696

9797
run:
9898
issues-exit-code: 1

.golangci.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -153,29 +153,29 @@ issues:
153153
fix: false
154154

155155
severity:
156-
# Default value is empty string.
157-
# Set the default severity for issues. If severity rules are defined and the issues
158-
# do not match or no severity is provided to the rule this will be the default
159-
# severity applied. Severities should match the supported severity names of the
160-
# selected out format.
161-
# - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
162-
# - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity
163-
# - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
164-
default-severity: error
156+
# Default value is empty string.
157+
# Set the default severity for issues. If severity rules are defined and the issues
158+
# do not match or no severity is provided to the rule this will be the default
159+
# severity applied. Severities should match the supported severity names of the
160+
# selected out format.
161+
# - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
162+
# - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity
163+
# - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
164+
default-severity: error
165165

166-
# The default value is false.
167-
# If set to true severity-rules regular expressions become case sensitive.
168-
case-sensitive: false
166+
# The default value is false.
167+
# If set to true severity-rules regular expressions become case sensitive.
168+
case-sensitive: false
169169

170-
# Default value is empty list.
171-
# When a list of severity rules are provided, severity information will be added to lint
172-
# issues. Severity rules have the same filtering capability as exclude rules except you
173-
# are allowed to specify one matcher per severity rule.
174-
# Only affects out formats that support setting severity information.
175-
rules:
176-
- linters:
177-
- dupl
178-
severity: warning
170+
# Default value is empty list.
171+
# When a list of severity rules are provided, severity information will be added to lint
172+
# issues. Severity rules have the same filtering capability as exclude rules except you
173+
# are allowed to specify one matcher per severity rule.
174+
# Only affects out formats that support setting severity information.
175+
rules:
176+
- linters:
177+
- dupl
178+
severity: warning
179179

180180
run:
181181
issues-exit-code: 0

.goreleaser.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ release:
77
88
gomod:
99
proxy: true
10-
# If proxy is true, use these environment variables when running `go mod` commands (namely, `go mod tidy`).
10+
# If proxy is true, use these environment variables when running `go mod` commands (namely, `go mod tidy`).
1111
# Defaults to `os.Environ()`.
1212
env:
1313
- GOPROXY=https://proxy.golang.org,direct
@@ -44,8 +44,7 @@ builds:
4444
- "{{ .Env.GO_BUILD_LDFLAGS }}"
4545
-
4646
universal_binaries:
47-
-
48-
# ID of the source build
47+
- # ID of the source build
4948
#
5049
# Defaults to the project name.
5150
id: cli

Makefile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ VERSION ?= $(shell git describe --tags $(git rev-list --tags --max-count=1))
44
APP_NAME?=aoc-cli
55
SHELL := env APP_NAME=$(APP_NAME) $(SHELL)
66

7-
GOTOOLS_IMAGE_TAG?=v0.0.2
7+
GOTOOLS_IMAGE_TAG?=v0.2.1
88
SHELL := env GOTOOLS_IMAGE_TAG=$(GOTOOLS_IMAGE_TAG) $(SHELL)
99

1010
COMPOSE_TOOLS_FILE=deployments/docker-compose/go-tools-docker-compose.yml
@@ -46,18 +46,17 @@ test-cover:
4646
$(COMPOSE_TOOLS_CMD_UP) run-tests-coverage run-tests-coverage
4747
.PHONY: test-cover
4848

49-
## Tests sonar report generate.
50-
test-sonar-report:
51-
./scripts/tests/sonar-report.sh
52-
.PHONY: test-sonar-report
49+
prepare-cover-report: test-cover
50+
$(COMPOSE_TOOLS_CMD_UP) prepare-cover-report prepare-cover-report
51+
.PHONY: prepare-cover-report
5352

5453
## Open coverage report.
55-
open-cover-report: test-cover
54+
open-cover-report: prepare-cover-report
5655
./scripts/open-coverage-report.sh
5756
.PHONY: open-cover-report
5857

5958
## Update readme coverage.
60-
update-readme-cover: build test-cover
59+
update-readme-cover: build prepare-cover-report
6160
$(COMPOSE_TOOLS_CMD_UP) update-readme-coverage update-readme-coverage
6261
.PHONY: update-readme-cover
6362

deployments/docker-compose/go-tools-docker-compose.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ services:
66
working_dir: /app/
77
volumes:
88
- ../../:/app/
9+
command: /bin/sh -c ''
910

1011
fix-imports:
1112
extends:
@@ -34,6 +35,11 @@ services:
3435
service: tools
3536
entrypoint: /bin/sh -c './scripts/tests/coverage.sh'
3637

38+
prepare-cover-report:
39+
extends:
40+
service: tools
41+
entrypoint: /bin/sh -c 'git config --global --add safe.directory /app && ./scripts/tests/prepare-cover-report.sh'
42+
3743
update-readme-coverage:
3844
extends:
3945
service: tools
@@ -47,12 +53,12 @@ services:
4753
lint-pipeline:
4854
extends:
4955
service: tools
50-
entrypoint: /bin/sh -c './scripts/linting/golangci-pipeline.sh'
56+
entrypoint: /bin/sh -c 'git config --global --add safe.directory /app && ./scripts/linting/golangci-pipeline.sh'
5157

5258
lint-sonar:
5359
extends:
5460
service: tools
55-
entrypoint: /bin/sh -c './scripts/linting/golangci-sonar.sh'
61+
entrypoint: /bin/sh -c 'git config --global --add safe.directory /app && ./scripts/linting/golangci-sonar.sh'
5662

5763
go-generate:
5864
extends:

0 commit comments

Comments
 (0)