Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions .github/workflows/_shared-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ jobs:

# setup global dependencies
- name: Set up go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: 1.22.x
go-version: 1.24.x

# setup project dependencies
- name: Get dependencies
Expand All @@ -71,7 +71,7 @@ jobs:

# upload artifacts
- name: "Upload artifact: assertoor_linux_amd64"
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: ./bin/*
name: assertoor_linux_amd64
Expand All @@ -86,9 +86,9 @@ jobs:

# setup global dependencies
- name: Set up go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: 1.22.x
go-version: 1.24.x

# setup cross build libs
- name: Get cross build dependencies
Expand All @@ -111,7 +111,7 @@ jobs:

# upload artifacts
- name: "Upload artifact: assertoor_linux_arm64"
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: ./bin/*
name: assertoor_linux_arm64
Expand All @@ -126,9 +126,9 @@ jobs:

# setup global dependencies
- name: Set up go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: 1.22.x
go-version: 1.24.x

# setup project dependencies
- name: Get dependencies
Expand All @@ -145,7 +145,7 @@ jobs:

# upload artifacts
- name: "Upload artifact: assertoor_windows_amd64"
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: ./bin/*
name: assertoor_windows_amd64
Expand All @@ -160,9 +160,9 @@ jobs:

# setup global dependencies
- name: Set up go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: 1.22.x
go-version: 1.24.x

# setup project dependencies
- name: Get dependencies
Expand All @@ -179,7 +179,7 @@ jobs:

# upload artifacts
- name: "Upload artifact: assertoor_darwin_amd64"
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: ./bin/*
name: assertoor_darwin_amd64
Expand All @@ -194,9 +194,9 @@ jobs:

# setup global dependencies
- name: Set up go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: 1.22.x
go-version: 1.24.x

# setup project dependencies
- name: Get dependencies
Expand All @@ -213,7 +213,7 @@ jobs:

# upload artifacts
- name: "Upload artifact: assertoor_darwin_arm64"
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: ./bin/*
name: assertoor_darwin_arm64
Expand All @@ -234,16 +234,16 @@ jobs:

# prepare docker
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Login to Docker Hub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# download build artifacts
- name: Download build artifacts
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
name: assertoor_linux_amd64
path: ./bin
Expand Down Expand Up @@ -281,18 +281,18 @@ jobs:

# prepare docker
- name: Set up Docker QEMU
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Login to Docker Hub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# download build artifacts
- name: Download build artifacts
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
name: assertoor_linux_arm64
path: ./bin
Expand Down Expand Up @@ -330,9 +330,9 @@ jobs:

# prepare docker
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Login to Docker Hub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down Expand Up @@ -365,9 +365,9 @@ jobs:

# prepare docker
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Login to Docker Hub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/_shared-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:

# setup global dependencies
- name: Set up go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: 1.22.x
go-version: 1.24.x

- name: Verify dependencies
run: go mod verify
Expand All @@ -33,10 +33,10 @@ jobs:


- name: Run golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.59.1
version: v2.0.1

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ jobs:
steps:
# download build artifacts
- name: "Download build artifacts"
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1

# (re)create snapshot binary release
- name: Update snapshot tag & remove previous snapshot release
uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3.2.0
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

# download build artifacts
- name: "Download build artifacts"
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1

# create draft release
- name: Create latest release
Expand Down
76 changes: 45 additions & 31 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,70 @@
linters-settings:
errcheck:
check-type-assertions: true
goconst:
min-len: 2
min-occurrences: 3
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
govet:
enable:
- shadow
nolintlint:
require-explanation: true
require-specific: true

version: "2"
run:
issues-exit-code: 1
linters:
disable-all: true
default: none
enable:
- bodyclose
- dogsled
- dupl
- errcheck
- exportloopref
- exhaustive
- goconst
- gocritic
- gofmt
- goimports
- gocyclo
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nolintlint
- nakedret
- nolintlint
- prealloc
- revive
- staticcheck
- stylecheck
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- whitespace
- wsl

run:
issues-exit-code: 1
settings:
errcheck:
check-type-assertions: true
goconst:
min-len: 2
min-occurrences: 3
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
govet:
enable:
- shadow
nolintlint:
require-explanation: true
require-specific: true
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM golang:1.22 AS builder
FROM golang:1.24 AS builder
WORKDIR /src
COPY go.sum go.mod ./
RUN go mod download
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-local
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM golang:1.22 AS builder
FROM golang:1.24 AS builder
WORKDIR /src
COPY go.sum go.mod ./
RUN go mod download
Expand Down
7 changes: 5 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@ var rootCmd = &cobra.Command{
config.Coordinator.MaxConcurrentTests = maxConcurrentTests
}

if logFormat == "json" {
switch logFormat {
case "json":
logr.SetFormatter(&logrus.JSONFormatter{})
logr.Info("Log format set to json")
} else if logFormat == "text" {
case "text":
logr.SetFormatter(&logrus.TextFormatter{})
logr.Info("Log format set to text")
default:
logr.Fatalf("Invalid log format: %s", logFormat)
}
if verbose {
logr.SetLevel(logrus.DebugLevel)
Expand Down
2 changes: 1 addition & 1 deletion docs/01-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Assertoor provides distribution-specific executables for Windows, Linux, and mac

## Build from Source

If you prefer to build Assertoor from source, ensure you have [Go](https://go.dev/) `>= 1.22` and Make installed on your machine. Assertoor is tested on Debian, but it should work on other operating systems as well.
If you prefer to build Assertoor from source, ensure you have [Go](https://go.dev/) `>= 1.24` and Make installed on your machine. Assertoor is tested on Debian, but it should work on other operating systems as well.

1. **Clone the Repository**:\
Use the following commands to clone the Assertoor repository and navigate to its directory:
Expand Down
Loading