Skip to content

Commit ccd107a

Browse files
committed
Merge branch 'master' into 219-implement-solution-for-puzzle-2022day02
2 parents e9bbc14 + dbfc391 commit ccd107a

File tree

169 files changed

+4055
-12542
lines changed

Some content is hidden

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

169 files changed

+4055
-12542
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,19 @@ updates:
2727
commit-message:
2828
prefix: "chore"
2929
include: "scope"
30+
31+
32+
- package-ecosystem: "docker"
33+
directory: "/build/docker/go-tools"
34+
schedule:
35+
interval: "daily"
36+
labels:
37+
- "dependencies"
38+
- "docker"
39+
assignees:
40+
- "obalunenko"
41+
reviewers:
42+
- "obalunenko"
43+
commit-message:
44+
prefix: "chore"
45+
include: "scope"

.github/workflows/codeql-analysis.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,32 @@ on:
2323
jobs:
2424
analyze:
2525
name: Analyze
26-
runs-on: ubuntu-latest
26+
runs-on: ${{ matrix.os }}
2727
permissions:
2828
actions: read
2929
contents: read
3030
security-events: write
31-
3231
strategy:
3332
fail-fast: true
3433
matrix:
35-
language: [ 'go' ]
3634
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3735
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38-
36+
language: [ 'go' ]
37+
os: [ 'ubuntu-22.04' ]
38+
go-version: [1.21]
3939
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v3
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 0
44+
45+
- name: Set up go
46+
uses: actions/[email protected]
47+
with:
48+
go-version: ${{ matrix.go-version }}
49+
- run: |
50+
go version
51+
shell: bash
4252
4353
# Initializes the CodeQL tools for scanning.
4454
- name: Initialize CodeQL

.github/workflows/dockerfiles.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: build-lint-docker-images
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
pull_request:
8+
types: [ opened, synchronize, reopened ]
9+
branches:
10+
- "*"
11+
paths:
12+
- "!**"
13+
- "build/docker/**"
14+
- "!build/docker/**.sh"
15+
- ".github/workflows/dockerfiles.yml"
16+
17+
jobs:
18+
lint-dockerfiles:
19+
strategy:
20+
fail-fast: false
21+
max-parallel: 4
22+
matrix:
23+
dockerfile:
24+
[
25+
"./build/docker/go-tools/Dockerfile",
26+
]
27+
runs-on: "ubuntu-22.04"
28+
name: Lint ${{ matrix.dockerfile }}
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Lint
36+
uses: jbergstroem/hadolint-gh-action@v1
37+
with:
38+
dockerfile: ${{ matrix.dockerfile }}
39+
annotate: true
40+
error_level: 2

.github/workflows/go.yml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ jobs:
4141
max-parallel: 3
4242
matrix:
4343
os: [ 'ubuntu-22.04' ]
44-
go: [ '1.20' ]
44+
go-version: [1.21]
4545
runs-on: ${{ matrix.os }}
4646
name: Build
4747
steps:
4848
- name: Checkout
49-
uses: actions/checkout@v3
49+
uses: actions/checkout@v4
5050
with:
5151
fetch-depth: 0
5252

5353
- name: Set up go
54-
uses: actions/setup-go@v4.0.0
54+
uses: actions/setup-go@v4.1.0
5555
with:
56-
go-version: ${{ matrix.go }}
56+
go-version: ${{ matrix.go-version }}
5757

5858
- run: |
5959
go version
@@ -72,13 +72,18 @@ jobs:
7272
restore-keys: |
7373
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }}
7474
75+
- name: Install tools
76+
run: |
77+
make install-tools
78+
shell: bash
79+
7580
- name: Build
7681
run: |
7782
make build
7883
shell: bash
7984

8085
- name: Install GoReleaser
81-
uses: goreleaser/goreleaser-action@v4
86+
uses: goreleaser/goreleaser-action@v5
8287
with:
8388
install-only: true
8489

@@ -93,19 +98,19 @@ jobs:
9398
max-parallel: 2
9499
matrix:
95100
os: [ 'ubuntu-22.04' ]
96-
go: [ '1.20' ]
101+
go-version: [1.21]
97102
runs-on: ${{ matrix.os }}
98103
name: Run Tests
99104
steps:
100105
- name: Checkout
101-
uses: actions/checkout@v3
106+
uses: actions/checkout@v4
102107
with:
103108
fetch-depth: 0
104109

105110
- name: Set up go
106-
uses: actions/setup-go@v4.0.0
111+
uses: actions/setup-go@v4.1.0
107112
with:
108-
go-version: ${{ matrix.go }}
113+
go-version: ${{ matrix.go-version }}
109114

110115
- run: |
111116
go version
@@ -140,23 +145,28 @@ jobs:
140145
max-parallel: 2
141146
matrix:
142147
os: [ 'ubuntu-22.04' ]
143-
go: [ '1.20' ]
148+
go-version: [1.21]
144149
runs-on: ${{ matrix.os }}
145150
name: Run linters
146151
steps:
147152
- name: Checkout
148-
uses: actions/checkout@v3
153+
uses: actions/checkout@v4
149154
with:
150155
fetch-depth: 0
151156

152157
- name: Set up go
153-
uses: actions/setup-go@v4.0.0
158+
uses: actions/setup-go@v4.1.0
154159
with:
155-
go-version: ${{ matrix.go }}
160+
go-version: ${{ matrix.go-version }}
156161
- run: |
157162
go version
158163
shell: bash
159164
165+
- name: Install tools
166+
run: |
167+
make install-tools
168+
shell: bash
169+
160170
- name: Vet
161171
run: |
162172
make vet
@@ -192,19 +202,19 @@ jobs:
192202
max-parallel: 1
193203
matrix:
194204
os: [ 'ubuntu-22.04' ]
195-
go: [ '1.20' ]
205+
go-version: [1.21]
196206
runs-on: ${{ matrix.os }}
197207
name: Quality reports
198208
steps:
199209
- name: Checkout
200-
uses: actions/checkout@v3
210+
uses: actions/checkout@v4
201211
with:
202212
fetch-depth: 0
203213

204214
- name: Set up go
205-
uses: actions/setup-go@v4.0.0
215+
uses: actions/setup-go@v4.1.0
206216
with:
207-
go-version: ${{ matrix.go }}
217+
go-version: ${{ matrix.go-version }}
208218
- run: |
209219
go version
210220
shell: bash

.github/workflows/readme-stars.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,21 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
26+
27+
- name: Update 2023 year
28+
uses: k2bd/[email protected]
29+
env:
30+
YEAR: 2023
31+
with:
32+
userId: ${{env.USER_ID}}
33+
leaderboardId: ${{env.BOARD_ID}}
34+
sessionCookie: ${{env.SESSION}}
35+
readmeLocation: ${{env.README}}
36+
headerPrefix: ${{env.HEADER_PFX}}
37+
year: ${{env.YEAR}}
38+
tableMarker: <!--- advent_readme_stars table [${{env.YEAR}}] --->
39+
starSymbol: ${{env.STAR_SYMBOL}}
2640

2741
- name: Update 2022 year
2842
uses: k2bd/[email protected]
@@ -137,6 +151,6 @@ jobs:
137151
starSymbol: ${{env.STAR_SYMBOL}}
138152

139153
- name: Commit changes
140-
uses: stefanzweifel/git-auto-commit-action@v4.16.0
154+
uses: stefanzweifel/git-auto-commit-action@v5.0.0
141155
with:
142156
commit_message: Update README stars.

.github/workflows/release.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ jobs:
1414
max-parallel: 2
1515
matrix:
1616
os: [ 'ubuntu-22.04' ]
17-
go: [ '1.20' ]
17+
go-version: [1.21]
1818
runs-on: ${{ matrix.os }}
1919
name: Build
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
2525

2626
- name: Set up go
27-
uses: actions/setup-go@v4.0.0
27+
uses: actions/setup-go@v4.1.0
2828
with:
29-
go-version: ${{ matrix.go }}
29+
go-version: ${{ matrix.go-version }}
3030

3131
- run: |
3232
go version
@@ -60,19 +60,19 @@ jobs:
6060
max-parallel: 2
6161
matrix:
6262
os: [ 'ubuntu-22.04' ]
63-
go: [ '1.20' ]
63+
go-version: [1.21]
6464
runs-on: ${{ matrix.os }}
6565
name: Regression tests
6666
steps:
6767
- name: Checkout
68-
uses: actions/checkout@v3
68+
uses: actions/checkout@v4
6969
with:
7070
fetch-depth: 0
7171

7272
- name: Set up go
73-
uses: actions/setup-go@v4.0.0
73+
uses: actions/setup-go@v4.1.0
7474
with:
75-
go-version: ${{ matrix.go }}
75+
go-version: ${{ matrix.go-version }}
7676

7777
- run: |
7878
go version
@@ -109,19 +109,19 @@ jobs:
109109
max-parallel: 1
110110
matrix:
111111
os: [ 'ubuntu-22.04' ]
112-
go: [ '1.20' ]
112+
go-version: [1.21]
113113
runs-on: ${{ matrix.os }}
114114
name: Lint
115115
steps:
116116
- name: Checkout
117-
uses: actions/checkout@v3
117+
uses: actions/checkout@v4
118118
with:
119119
fetch-depth: 0
120120

121121
- name: Set up go
122-
uses: actions/setup-go@v4.0.0
122+
uses: actions/setup-go@v4.1.0
123123
with:
124-
go-version: ${{ matrix.go }}
124+
go-version: ${{ matrix.go-version }}
125125

126126
- run: |
127127
go version
@@ -162,26 +162,26 @@ jobs:
162162
max-parallel: 1
163163
matrix:
164164
os: [ 'ubuntu-22.04' ]
165-
go: [ '1.20' ]
165+
go-version: [1.21]
166166
runs-on: ${{ matrix.os }}
167167
name: Release
168168
steps:
169169
- name: Checkout
170-
uses: actions/checkout@v3
170+
uses: actions/checkout@v4
171171
with:
172172
fetch-depth: 0
173173

174174
- name: Set up go
175-
uses: actions/setup-go@v4.0.0
175+
uses: actions/setup-go@v4.1.0
176176
with:
177-
go-version: ${{ matrix.go }}
177+
go-version: ${{ matrix.go-version }}
178178

179179
- run: |
180180
go version
181181
shell: bash
182182
183183
- name: Install GoReleaser
184-
uses: goreleaser/goreleaser-action@v4
184+
uses: goreleaser/goreleaser-action@v5
185185
with:
186186
install-only: true
187187

.golangci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
linters-settings:
22
depguard:
3-
list-type: blacklist
4-
packages:
5-
# logging is allowed only by logutils.Log, logrus
6-
# is allowed to use only in logutils package
7-
- github.com/sirupsen/logrus
8-
packages-with-error-message:
9-
- github.com/sirupsen/logrus: "logging is allowed only by github.com/obalunenko/logger"
3+
# new configuration
4+
rules:
5+
logger:
6+
deny:
7+
- pkg: "github.com/sirupsen/logrus"
8+
desc: logging is allowed only by github.com/obalunenko/logger
109
dupl:
1110
threshold: 100
1211
funlen:

0 commit comments

Comments
 (0)