Skip to content

Commit 7172fc3

Browse files
authored
chore: upgrade dependencies (#2589)
* chore: upgrade dependencies * fix: linter errors * chore: bump version of golangci-lint * chore: go mod tidy * fix: failing test * fix: update version of upload-artifact to v4 * chore: format test output with gotestfmt * fix: typo in test exec * fix: failing tests * fix: windows unit test execution * fix: windows unit test execution * fix: whitespace
1 parent e6b5062 commit 7172fc3

Some content is hidden

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

52 files changed

+392
-505
lines changed

.github/actions/run-tests/action.yml

-77
This file was deleted.

.github/workflows/checks.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ jobs:
2424
check-latest: true
2525
- uses: golangci/[email protected]
2626
with:
27-
version: v1.53
28-
only-new-issues: true
27+
version: v1.62
2928
- uses: megalinter/megalinter/flavors/[email protected]
3029
env:
3130
DEFAULT_BRANCH: master
@@ -54,10 +53,10 @@ jobs:
5453
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
5554
restore-keys: |
5655
${{ runner.os }}-go-
56+
- name: Install gotestfmt
57+
run: go install github.com/gotesttools/gotestfmt/v2/cmd/[email protected]
5758
- name: Run Tests
58-
uses: ./.github/actions/run-tests
59-
with:
60-
upload-logs-name: logs-linux
59+
run: go test -json -v -cover -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic -timeout 20m ./... | gotestfmt -hide successful-packages,empty-packages 2>&1
6160
- name: Run act from cli
6261
run: go run main.go -P ubuntu-latest=node:16-buster-slim -C ./pkg/runner/testdata/ -W ./basic/push.yml
6362
- name: Run act from cli without docker support
@@ -75,7 +74,7 @@ jobs:
7574
os:
7675
- windows-latest
7776
- macos-latest
78-
name: test-${{matrix.os}}
77+
name: test-host-${{matrix.os}}
7978
runs-on: ${{matrix.os}}
8079
steps:
8180
- uses: actions/checkout@v4
@@ -85,11 +84,12 @@ jobs:
8584
with:
8685
go-version-file: go.mod
8786
check-latest: true
87+
- name: Install gotestfmt
88+
run: go install github.com/gotesttools/gotestfmt/v2/cmd/[email protected]
8889
- name: Run Tests
89-
uses: ./.github/actions/run-tests
90-
with:
91-
filter: '^TestRunEventHostEnvironment$'
92-
upload-logs-name: logs-${{ matrix.os }}
90+
run: go test -v -cover -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic -timeout 20m -run ^TestRunEventHostEnvironment$ ./...
91+
shell: bash
92+
9393

9494
snapshot:
9595
name: snapshot

.golangci.yml

+11-6
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22
run:
33
timeout: 3m
44

5-
skip-dirs:
6-
- report # megalinter results+fixes
5+
issues:
6+
exclude-dirs:
7+
- report # megalinter results+fixes
8+
max-issues-per-linter: 0
9+
max-same-issues: 0
710

811
linters-settings:
912
gocyclo:
1013
# minimal code complexity to report, 30 by default (but we recommend 10-20)
11-
min-complexity: 15
14+
min-complexity: 20
1215
gocritic:
1316
disabled-checks:
1417
- ifElseChain
1518
importas:
16-
aliases:
19+
alias:
1720
- pkg: 'github.com/sirupsen/logrus'
1821
alias: log
1922
- pkg: 'github.com/stretchr/testify/assert'
@@ -30,7 +33,9 @@ linters-settings:
3033
desc: Please keep logging unified using only github.com/sirupsen/logrus
3134
linters:
3235
enable:
33-
- megacheck
36+
- gosimple
37+
- staticcheck
38+
- unused
3439
- govet
3540
- revive
3641
- gocyclo
@@ -39,7 +44,7 @@ linters:
3944
- dupl
4045
- nakedret
4146
- prealloc
42-
- exportloopref
47+
- copyloopvar
4348
- gocritic
4449
- goimports
4550
- whitespace

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,8 @@ snapshot:
111111
--snapshot
112112

113113
.PHONY: clean all
114+
115+
.PHONY: upgrade
116+
upgrade:
117+
go get -u
118+
go mod tidy

cmd/root.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func setup(_ *Input) func(*cobra.Command, []string) {
278278
}
279279

280280
func cleanup(inputs *Input) func(*cobra.Command, []string) {
281-
return func(cmd *cobra.Command, _ []string) {
281+
return func(_ *cobra.Command, _ []string) {
282282
displayNotices(inputs)
283283
}
284284
}
@@ -642,7 +642,7 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
642642
return plannerErr
643643
}
644644

645-
executor := r.NewPlanExecutor(plan).Finally(func(ctx context.Context) error {
645+
executor := r.NewPlanExecutor(plan).Finally(func(_ context.Context) error {
646646
cancel()
647647
_ = cacheHandler.Close()
648648
return nil
@@ -658,7 +658,7 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
658658
func defaultImageSurvey(actrc string) error {
659659
var answer string
660660
confirmation := &survey.Select{
661-
Message: "Please choose the default image you want to use with act:\n - Large size image: ca. 17GB download + 53.1GB storage, you will need 75GB of free disk space, snapshots of GitHub Hosted Runners without snap and pulled docker images\n - Medium size image: ~500MB, includes only necessary tools to bootstrap actions and aims to be compatible with most actions\n - Micro size image: <200MB, contains only NodeJS required to bootstrap actions, doesn't work with all actions\n\nDefault image and other options can be changed manually in " + configLocations()[0] + " (please refer to https://github.com/nektos/act#configuration for additional information about file structure)",
661+
Message: "Please choose the default image you want to use with act:\n - Large size image: ca. 17GB download + 53.1GB storage, you will need 75GB of free disk space, snapshots of GitHub Hosted Runners without snap and pulled docker images\n - Medium size image: ~500MB, includes only necessary tools to bootstrap actions and aims to be compatible with most actions\n - Micro size image: <200MB, contains only NodeJS required to bootstrap actions, doesn't work with all actions\n\nDefault image and other options can be changed manually in " + configLocations()[0] + " (please refer to https://github.com/nektos/act#configuration for additional information about file structure)",
662662
Help: "If you want to know why act asks you that, please go to https://github.com/nektos/act/issues/107",
663663
Default: "Medium",
664664
Options: []string{"Large", "Medium", "Micro"},

go.mod

+42-40
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
module github.com/nektos/act
22

3-
go 1.21
3+
go 1.23
44

55
require (
66
github.com/AlecAivazis/survey/v2 v2.3.7
77
github.com/Masterminds/semver v1.5.0
88
github.com/adrg/xdg v0.5.3
99
github.com/andreaskoch/go-fswatch v1.0.0
1010
github.com/creack/pty v1.1.24
11-
github.com/docker/cli v26.1.5+incompatible
12-
github.com/docker/distribution v2.8.3+incompatible
13-
github.com/docker/docker v26.1.5+incompatible
11+
github.com/docker/cli v27.4.1+incompatible
12+
github.com/docker/docker v27.4.1+incompatible
1413
github.com/docker/go-connections v0.5.0
1514
github.com/go-git/go-billy/v5 v5.6.0
1615
github.com/go-git/go-git/v5 v5.12.0
1716
github.com/joho/godotenv v1.5.1
1817
github.com/julienschmidt/httprouter v1.3.0
1918
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
2019
github.com/mattn/go-isatty v0.0.20
21-
github.com/moby/buildkit v0.13.2
2220
github.com/moby/patternmatcher v0.6.0
2321
github.com/opencontainers/image-spec v1.1.0
2422
github.com/opencontainers/selinux v1.11.1
@@ -28,81 +26,85 @@ require (
2826
github.com/sirupsen/logrus v1.9.3
2927
github.com/spf13/cobra v1.8.1
3028
github.com/spf13/pflag v1.0.5
31-
github.com/stretchr/testify v1.9.0
29+
github.com/stretchr/testify v1.10.0
3230
github.com/timshannon/bolthold v0.0.0-20240314194003-30aac6950928
33-
go.etcd.io/bbolt v1.3.10
34-
golang.org/x/term v0.25.0
31+
go.etcd.io/bbolt v1.3.11
32+
golang.org/x/term v0.27.0
3533
gopkg.in/yaml.v3 v3.0.1
3634
gotest.tools/v3 v3.5.1
3735
)
3836

3937
require (
4038
dario.cat/mergo v1.0.1
39+
github.com/distribution/reference v0.6.0
4140
github.com/golang-jwt/jwt/v5 v5.2.1
42-
google.golang.org/protobuf v1.35.1
41+
google.golang.org/protobuf v1.36.1
4342
)
4443

4544
require (
46-
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
47-
github.com/Microsoft/go-winio v0.6.1 // indirect
48-
github.com/ProtonMail/go-crypto v1.0.0 // indirect
45+
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
46+
github.com/Microsoft/go-winio v0.6.2 // indirect
47+
github.com/ProtonMail/go-crypto v1.1.3 // indirect
4948
github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect
50-
github.com/cloudflare/circl v1.3.7 // indirect
51-
github.com/containerd/containerd v1.7.13 // indirect
49+
github.com/cloudflare/circl v1.5.0 // indirect
5250
github.com/containerd/log v0.1.0 // indirect
53-
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
54-
github.com/cyphar/filepath-securejoin v0.2.5 // indirect
51+
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
52+
github.com/cyphar/filepath-securejoin v0.3.6 // indirect
5553
github.com/davecgh/go-spew v1.1.1 // indirect
56-
github.com/distribution/reference v0.5.0 // indirect
57-
github.com/docker/docker-credential-helpers v0.8.0 // indirect
54+
github.com/docker/docker-credential-helpers v0.8.2 // indirect
5855
github.com/docker/go-units v0.5.0 // indirect
5956
github.com/emirpasic/gods v1.18.1 // indirect
60-
github.com/fatih/color v1.17.0 // indirect
57+
github.com/fatih/color v1.18.0 // indirect
6158
github.com/felixge/httpsnoop v1.0.4 // indirect
6259
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
63-
github.com/go-logr/logr v1.4.1 // indirect
60+
github.com/go-logr/logr v1.4.2 // indirect
6461
github.com/go-logr/stdr v1.2.2 // indirect
62+
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
6563
github.com/gogo/protobuf v1.3.2 // indirect
66-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
64+
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
6765
github.com/google/go-cmp v0.6.0 // indirect
6866
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
6967
github.com/inconshreveable/mousetrap v1.1.0 // indirect
7068
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
7169
github.com/kevinburke/ssh_config v1.2.0 // indirect
72-
github.com/klauspost/compress v1.17.4 // indirect
70+
github.com/klauspost/compress v1.17.11 // indirect
7371
github.com/mattn/go-colorable v0.1.13 // indirect
7472
github.com/mattn/go-runewidth v0.0.16 // indirect
75-
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
76-
github.com/mitchellh/mapstructure v1.1.2 // indirect
73+
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
7774
github.com/moby/docker-image-spec v1.3.1 // indirect
78-
github.com/moby/sys/sequential v0.5.0 // indirect
79-
github.com/moby/sys/user v0.1.0 // indirect
75+
github.com/moby/sys/sequential v0.6.0 // indirect
76+
github.com/moby/sys/user v0.3.0 // indirect
77+
github.com/moby/sys/userns v0.1.0 // indirect
78+
github.com/moby/term v0.5.0 // indirect
79+
github.com/morikuni/aec v1.0.0 // indirect
8080
github.com/opencontainers/go-digest v1.0.0 // indirect
8181
github.com/pjbgf/sha1cd v0.3.0 // indirect
8282
github.com/pmezard/go-difflib v1.0.0 // indirect
8383
github.com/rivo/uniseg v0.4.7 // indirect
8484
github.com/robfig/cron/v3 v3.0.1 // indirect
8585
github.com/russross/blackfriday/v2 v2.1.0 // indirect
8686
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
87-
github.com/skeema/knownhosts v1.2.2 // indirect
87+
github.com/skeema/knownhosts v1.3.0 // indirect
8888
github.com/stretchr/objx v0.5.2 // indirect
8989
github.com/xanzy/ssh-agent v0.3.3 // indirect
9090
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
9191
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
9292
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
93-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0 // indirect
94-
go.opentelemetry.io/otel v1.25.0 // indirect
95-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect
96-
go.opentelemetry.io/otel/metric v1.25.0 // indirect
97-
go.opentelemetry.io/otel/sdk v1.25.0 // indirect
98-
go.opentelemetry.io/otel/trace v1.25.0 // indirect
99-
golang.org/x/crypto v0.25.0 // indirect
100-
golang.org/x/mod v0.17.0 // indirect
101-
golang.org/x/net v0.27.0 // indirect
102-
golang.org/x/sync v0.8.0 // indirect
103-
golang.org/x/sys v0.26.0 // indirect
104-
golang.org/x/text v0.16.0 // indirect
105-
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
93+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
94+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect
95+
go.opentelemetry.io/otel v1.33.0 // indirect
96+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect
97+
go.opentelemetry.io/otel/metric v1.33.0 // indirect
98+
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
99+
go.opentelemetry.io/otel/trace v1.33.0 // indirect
100+
golang.org/x/crypto v0.31.0 // indirect
101+
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
102+
golang.org/x/net v0.33.0 // indirect
103+
golang.org/x/sync v0.10.0 // indirect
104+
golang.org/x/sys v0.28.0 // indirect
105+
golang.org/x/text v0.21.0 // indirect
106+
golang.org/x/time v0.6.0 // indirect
107+
google.golang.org/grpc v1.66.3 // indirect
106108
gopkg.in/warnings.v0 v0.1.2 // indirect
107109
gopkg.in/yaml.v2 v2.4.0 // indirect
108110
)

0 commit comments

Comments
 (0)