Skip to content

Commit 5d8e8de

Browse files
authored
Update deps and CI (#16)
1 parent 82085cf commit 5d8e8de

File tree

9 files changed

+36
-73
lines changed

9 files changed

+36
-73
lines changed

.github/workflows/cloc.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
path: pr
1919
- name: Checkout base code
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
with:
2222
ref: ${{ github.event.pull_request.base.sha }}
2323
path: base

.github/workflows/golangci-lint.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ jobs:
1919
name: golangci-lint
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/setup-go@v3
22+
- uses: actions/setup-go@v5
2323
with:
24-
go-version: 1.23.x
25-
- uses: actions/checkout@v2
24+
go-version: stable
25+
- uses: actions/checkout@v4
2626
- name: golangci-lint
27-
uses: golangci/golangci-lint-action@v6.1.0
27+
uses: golangci/golangci-lint-action@v6.5.0
2828
with:
2929
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
30-
version: v1.61.0
30+
version: v1.64.5
3131

3232
# Optional: working directory, useful for monorepos
3333
# working-directory: somedir

.github/workflows/gorelease.yml

+5-15
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,19 @@ concurrency:
99
cancel-in-progress: true
1010

1111
env:
12-
GO_VERSION: 1.23.x
12+
GO_VERSION: stable
1313
jobs:
1414
gorelease:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- name: Install Go stable
18-
if: env.GO_VERSION != 'tip'
19-
uses: actions/setup-go@v4
17+
- name: Install Go
18+
uses: actions/setup-go@v5
2019
with:
2120
go-version: ${{ env.GO_VERSION }}
22-
- name: Install Go tip
23-
if: env.GO_VERSION == 'tip'
24-
run: |
25-
curl -sL https://storage.googleapis.com/go-build-snap/go/linux-amd64/$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1;}').tar.gz -o gotip.tar.gz
26-
ls -lah gotip.tar.gz
27-
mkdir -p ~/sdk/gotip
28-
tar -C ~/sdk/gotip -xzf gotip.tar.gz
29-
~/sdk/gotip/bin/go version
30-
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV
3121
- name: Checkout code
32-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
3323
- name: Gorelease cache
34-
uses: actions/cache@v3
24+
uses: actions/cache@v4
3525
with:
3626
path: |
3727
~/go/bin/gorelease

.github/workflows/release-assets.yml

+4-15
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,22 @@ on:
88
- created
99
env:
1010
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11-
GO_VERSION: 1.23.x
11+
GO_VERSION: stable
1212
LINUX_AMD64_BUILD_OPTIONS: '-tags cgo_zstd'
1313
GOAMD64: v3
1414
jobs:
1515
build:
1616
name: Upload Release Assets
1717
runs-on: ubuntu-20.04
1818
steps:
19-
- name: Install Go stable
20-
if: env.GO_VERSION != 'tip'
21-
uses: actions/setup-go@v4
19+
- name: Install Go
20+
uses: actions/setup-go@v5
2221
with:
2322
go-version: ${{ env.GO_VERSION }}
24-
- name: Install Go tip
25-
if: env.GO_VERSION == 'tip'
26-
run: |
27-
curl -sL https://storage.googleapis.com/go-build-snap/go/linux-amd64/$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1;}').tar.gz -o gotip.tar.gz
28-
ls -lah gotip.tar.gz
29-
mkdir -p ~/sdk/gotip
30-
tar -C ~/sdk/gotip -xzf gotip.tar.gz
31-
~/sdk/gotip/bin/go version
32-
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV
3323
- name: Checkout code
34-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
3525
- name: Build artifacts
3626
run: |
37-
git fetch -t
3827
make release-assets
3928
- name: Upload linux_amd64.tar.gz
4029
if: hashFiles('linux_amd64.tar.gz') != ''

.github/workflows/test-unit.yml

+9-20
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,25 @@ concurrency:
1515
env:
1616
GO111MODULE: "on"
1717
RUN_BASE_COVERAGE: "on" # Runs test for PR base in case base test coverage is missing.
18-
COV_GO_VERSION: 1.22.x # Version of Go to collect coverage
18+
COV_GO_VERSION: stable # Version of Go to collect coverage
1919
TARGET_DELTA_COV: 90 # Target coverage of changed lines, in percents
2020
jobs:
2121
test:
2222
strategy:
2323
matrix:
24-
go-version: [ 1.21.x, 1.22.x, 1.23.x ]
24+
go-version: [ stable, oldstable ]
2525
runs-on: ubuntu-latest
2626
steps:
27-
- name: Install Go stable
28-
if: matrix.go-version != 'tip'
29-
uses: actions/setup-go@v4
27+
- name: Install Go
28+
uses: actions/setup-go@v5
3029
with:
3130
go-version: ${{ matrix.go-version }}
3231

33-
- name: Install Go tip
34-
if: matrix.go-version == 'tip'
35-
run: |
36-
curl -sL https://storage.googleapis.com/go-build-snap/go/linux-amd64/$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1;}').tar.gz -o gotip.tar.gz
37-
ls -lah gotip.tar.gz
38-
mkdir -p ~/sdk/gotip
39-
tar -C ~/sdk/gotip -xzf gotip.tar.gz
40-
~/sdk/gotip/bin/go version
41-
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV
42-
4332
- name: Checkout code
44-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
4534

4635
- name: Go cache
47-
uses: actions/cache@v3
36+
uses: actions/cache@v4
4837
with:
4938
# In order:
5039
# * Module download cache
@@ -59,7 +48,7 @@ jobs:
5948
- name: Restore base test coverage
6049
id: base-coverage
6150
if: matrix.go-version == env.COV_GO_VERSION && github.event.pull_request.base.sha != ''
62-
uses: actions/cache@v2
51+
uses: actions/cache@v4
6352
with:
6453
path: |
6554
unit-base.txt
@@ -130,7 +119,7 @@ jobs:
130119

131120
- name: Upload code coverage
132121
if: matrix.go-version == env.COV_GO_VERSION
133-
uses: codecov/codecov-action@v1
122+
uses: codecov/codecov-action@v5
134123
with:
135-
file: ./unit.coverprofile
124+
files: ./unit.coverprofile
136125
flags: unittests

.golangci.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ linters-settings:
1212
threshold: 100
1313
misspell:
1414
locale: US
15-
unused:
16-
check-exported: false
1715
unparam:
1816
check-exported: true
1917
funlen:
@@ -24,9 +22,10 @@ linters-settings:
2422
linters:
2523
enable-all: true
2624
disable:
25+
- intrange
26+
- copyloopvar
2727
- lll
2828
- gochecknoglobals
29-
- gomnd
3029
- wrapcheck
3130
- paralleltest
3231
- forbidigo
@@ -41,25 +40,21 @@ linters:
4140
- dupword
4241
- depguard
4342
- tagalign
44-
- execinquery
4543
- mnd
4644
- testifylint
45+
- recvcheck
4746

4847
issues:
4948
exclude-use-default: false
5049
exclude-rules:
5150
- linters:
52-
- gomnd
5351
- mnd
5452
- goconst
55-
- goerr113
5653
- noctx
5754
- funlen
5855
- dupl
59-
- structcheck
6056
- unused
6157
- unparam
62-
- nosnakecase
6358
path: "_test.go"
6459
- linters:
6560
- errcheck # Error checking omitted for brevity.

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#GOLANGCI_LINT_VERSION := "v1.61.0" # Optional configuration to pinpoint golangci-lint version.
1+
#GOLANGCI_LINT_VERSION := "v1.64.5" # Optional configuration to pinpoint golangci-lint version.
22

33
# The head of Makefile determines location of dev-go to include standard targets.
44
GO ?= go

go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module github.com/bool64/progress
22

3-
go 1.21
3+
go 1.22
44

55
require (
66
github.com/DataDog/zstd v1.5.6
7-
github.com/bool64/dev v0.2.36
8-
github.com/klauspost/compress v1.17.10
7+
github.com/bool64/dev v0.2.39
8+
github.com/klauspost/compress v1.18.0
99
github.com/klauspost/pgzip v1.2.6
1010
)

go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
github.com/DataDog/zstd v1.5.6 h1:LbEglqepa/ipmmQJUDnSsfvA8e8IStVcGaFWDuxvGOY=
22
github.com/DataDog/zstd v1.5.6/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
3-
github.com/bool64/dev v0.2.36 h1:yU3bbOTujoxhWnt8ig8t94PVmZXIkCaRj9C57OtqJBY=
4-
github.com/bool64/dev v0.2.36/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg=
5-
github.com/klauspost/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0=
6-
github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
3+
github.com/bool64/dev v0.2.39 h1:kP8DnMGlWXhGYJEZE/J0l/gVBdbuhoPGL+MJG4QbofE=
4+
github.com/bool64/dev v0.2.39/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg=
5+
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
6+
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
77
github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
88
github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=

0 commit comments

Comments
 (0)