Skip to content

Commit

Permalink
Merge branch 'master' into 219-implement-solution-for-puzzle-2022day02
Browse files Browse the repository at this point in the history
  • Loading branch information
obalunenko committed Dec 5, 2023
2 parents e9bbc14 + dbfc391 commit ccd107a
Show file tree
Hide file tree
Showing 169 changed files with 4,055 additions and 12,542 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,19 @@ updates:
commit-message:
prefix: "chore"
include: "scope"


- package-ecosystem: "docker"
directory: "/build/docker/go-tools"
schedule:
interval: "daily"
labels:
- "dependencies"
- "docker"
assignees:
- "obalunenko"
reviewers:
- "obalunenko"
commit-message:
prefix: "chore"
include: "scope"
22 changes: 16 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,32 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: true
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

language: [ 'go' ]
os: [ 'ubuntu-22.04' ]
go-version: [1.21]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up go
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go-version }}
- run: |
go version
shell: bash
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/dockerfiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build-lint-docker-images

on:
push:
branches:
- "master"
pull_request:
types: [ opened, synchronize, reopened ]
branches:
- "*"
paths:
- "!**"
- "build/docker/**"
- "!build/docker/**.sh"
- ".github/workflows/dockerfiles.yml"

jobs:
lint-dockerfiles:
strategy:
fail-fast: false
max-parallel: 4
matrix:
dockerfile:
[
"./build/docker/go-tools/Dockerfile",
]
runs-on: "ubuntu-22.04"
name: Lint ${{ matrix.dockerfile }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Lint
uses: jbergstroem/hadolint-gh-action@v1
with:
dockerfile: ${{ matrix.dockerfile }}
annotate: true
error_level: 2
44 changes: 27 additions & 17 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ jobs:
max-parallel: 3
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.20' ]
go-version: [1.21]
runs-on: ${{ matrix.os }}
name: Build
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up go
uses: actions/setup-go@v4.0.0
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go }}
go-version: ${{ matrix.go-version }}

- run: |
go version
Expand All @@ -72,13 +72,18 @@ jobs:
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/tools/go.sum') }}
- name: Install tools
run: |
make install-tools
shell: bash

- name: Build
run: |
make build
shell: bash

- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
install-only: true

Expand All @@ -93,19 +98,19 @@ jobs:
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.20' ]
go-version: [1.21]
runs-on: ${{ matrix.os }}
name: Run Tests
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up go
uses: actions/setup-go@v4.0.0
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go }}
go-version: ${{ matrix.go-version }}

- run: |
go version
Expand Down Expand Up @@ -140,23 +145,28 @@ jobs:
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.20' ]
go-version: [1.21]
runs-on: ${{ matrix.os }}
name: Run linters
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up go
uses: actions/setup-go@v4.0.0
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go }}
go-version: ${{ matrix.go-version }}
- run: |
go version
shell: bash
- name: Install tools
run: |
make install-tools
shell: bash

- name: Vet
run: |
make vet
Expand Down Expand Up @@ -192,19 +202,19 @@ jobs:
max-parallel: 1
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.20' ]
go-version: [1.21]
runs-on: ${{ matrix.os }}
name: Quality reports
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up go
uses: actions/setup-go@v4.0.0
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go }}
go-version: ${{ matrix.go-version }}
- run: |
go version
shell: bash
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/readme-stars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,21 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Update 2023 year
uses: k2bd/advent-readme-stars@v1.0.3
env:
YEAR: 2023
with:
userId: ${{env.USER_ID}}
leaderboardId: ${{env.BOARD_ID}}
sessionCookie: ${{env.SESSION}}
readmeLocation: ${{env.README}}
headerPrefix: ${{env.HEADER_PFX}}
year: ${{env.YEAR}}
tableMarker: <!--- advent_readme_stars table [${{env.YEAR}}] --->
starSymbol: ${{env.STAR_SYMBOL}}

- name: Update 2022 year
uses: k2bd/advent-readme-stars@v1.0.3
Expand Down Expand Up @@ -137,6 +151,6 @@ jobs:
starSymbol: ${{env.STAR_SYMBOL}}

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4.16.0
uses: stefanzweifel/git-auto-commit-action@v5.0.0
with:
commit_message: Update README stars.
34 changes: 17 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ jobs:
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.20' ]
go-version: [1.21]
runs-on: ${{ matrix.os }}
name: Build
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up go
uses: actions/setup-go@v4.0.0
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go }}
go-version: ${{ matrix.go-version }}

- run: |
go version
Expand Down Expand Up @@ -60,19 +60,19 @@ jobs:
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.20' ]
go-version: [1.21]
runs-on: ${{ matrix.os }}
name: Regression tests
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up go
uses: actions/setup-go@v4.0.0
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go }}
go-version: ${{ matrix.go-version }}

- run: |
go version
Expand Down Expand Up @@ -109,19 +109,19 @@ jobs:
max-parallel: 1
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.20' ]
go-version: [1.21]
runs-on: ${{ matrix.os }}
name: Lint
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up go
uses: actions/setup-go@v4.0.0
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go }}
go-version: ${{ matrix.go-version }}

- run: |
go version
Expand Down Expand Up @@ -162,26 +162,26 @@ jobs:
max-parallel: 1
matrix:
os: [ 'ubuntu-22.04' ]
go: [ '1.20' ]
go-version: [1.21]
runs-on: ${{ matrix.os }}
name: Release
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up go
uses: actions/setup-go@v4.0.0
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ matrix.go }}
go-version: ${{ matrix.go-version }}

- run: |
go version
shell: bash
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
install-only: true

Expand Down
13 changes: 6 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
linters-settings:
depguard:
list-type: blacklist
packages:
# logging is allowed only by logutils.Log, logrus
# is allowed to use only in logutils package
- github.com/sirupsen/logrus
packages-with-error-message:
- github.com/sirupsen/logrus: "logging is allowed only by github.com/obalunenko/logger"
# new configuration
rules:
logger:
deny:
- pkg: "github.com/sirupsen/logrus"
desc: logging is allowed only by github.com/obalunenko/logger
dupl:
threshold: 100
funlen:
Expand Down
Loading

0 comments on commit ccd107a

Please sign in to comment.