Skip to content

Commit

Permalink
update CI (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
SVilgelm authored Nov 25, 2024
1 parent e969007 commit ace6d08
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 145 deletions.
13 changes: 0 additions & 13 deletions .github/Brewfile

This file was deleted.

9 changes: 0 additions & 9 deletions .github/goreleaser-lib.yml

This file was deleted.

30 changes: 17 additions & 13 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ on:
schedule:
- cron: "0 0 * * 0"

concurrency:
group: ${{ format('{0}-{1}', github.workflow, github.head_ref) }}
cancel-in-progress: true

env:
GO: 1.17
GO: "1.23"

jobs:
CodeQL:
Expand All @@ -22,49 +26,49 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
languages: go

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5

UnitTests:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ env.GO }}

- name: Run Unit Tests
run: go test -race -cover -coverprofile=coverage.out -covermode=atomic

- name: Codecov
uses: codecov/codecov-action@v5.0.7
with:
file: ./coverage.out
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

GolangCI-Lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ env.GO }}

- name: Run GolangCi-Lint
uses: golangci/golangci-lint-action@v6.1.1
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: latest
version: latest
68 changes: 0 additions & 68 deletions .github/workflows/release.yaml

This file was deleted.

13 changes: 7 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ linters:
enable: # keep in ascending order
- asciicheck
- bodyclose
- copyloopvar
- dupl
- durationcheck
- err113
- exhaustive
- exportloopref
- gci
- gocognit
- goconst
- gocritic
- gocyclo
- goerr113
- gofumpt
- goprintffuncname
- gosec
Expand Down Expand Up @@ -43,7 +41,10 @@ linters-settings:
disable:
- shadow
gci:
local-prefixes: github.com/sv-tools/conf-reader-flags
sections:
- standard
- default
- prefix(github.com/sv-tools/conf-reader-flags)
gocognit:
min-complexity: 15
gocyclo:
Expand Down Expand Up @@ -73,4 +74,4 @@ linters-settings:
issues:
exclude-use-default: false
exclude:
- should have a package comment
- should have a package comment
35 changes: 0 additions & 35 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/sv-tools/conf-reader-flags

go 1.17
go 1.23.0

require (
github.com/spf13/pflag v1.0.5
Expand Down

0 comments on commit ace6d08

Please sign in to comment.