Commit graph

96 commits

Author SHA1 Message Date
Anna Shaleva
5cffa90774 workflows: remove macos-12 support
Support for macos-12 will be deprecated 10/7/24 and the image will
be fully unsupported by 12/3/24. Ref.
https://github.com/actions/runner-images/issues/10721.

Get rid of the build warning:
```
A brownout will take place on November 4, 14:00 UTC - November 5, 00:00
UTC to raise awareness of the upcoming macOS-12 environment removal.
```

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-11-02 13:08:12 +03:00
Anna Shaleva
25b353c9f8 workflows: enable lint for interop package
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-10-11 12:41:06 +03:00
Anna Shaleva
9fb291d5df workflows: add linter for scripts
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-10-11 12:40:55 +03:00
Anna Shaleva
949ed4f2ea workflows: enable linter for example contracts
Avoid situations like 9f93123301.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-10-10 11:36:45 +03:00
Ekaterina Pavlova
379ca4b4e6 linter: use org-wide version of linter
Close #3591,
Close #3417.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-09-25 21:47:45 +03:00
Roman Khimov
dfcff64acb go.mod: update to Go 1.22+
This also changes workflows to test 1.22 and 1.23 only (refs. https://github.com/nspcc-dev/.github/issues/30).
Fixes #3310.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-08-30 17:00:11 +03:00
Roman Khimov
f21edef43b *: bump min Go to 1.21, use 1.23 by default
Fixes #3089.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-08-23 19:11:06 +03:00
Slava0135
d0c45477f5 neotest: implement coverage collection
Test coverage is automatically enabled when go test is running with coverage
enabled. It can be disabled for any Executor by using relevant methods.
Coverage is gathered by capturing VM OPs during test contract execution and
mapping them to the contract source code using the DebugInfo information.

Signed-off-by: Slava0135 <super.novalskiy_0135@inbox.ru>
2024-08-19 14:39:18 +03:00
Anna Shaleva
f4aeaa6387 workflows: protect go.mod from unexpected imports
Avoid situations like #3458.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-05-24 21:11:39 +03:00
Anna Shaleva
244ca6f438 workflows: enable testing jobs for go scripts
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-05-14 15:55:23 +03:00
Roman Khimov
4a8a43b983
Merge pull request #3420 from nspcc-dev/ensure-stringers 2024-04-25 16:48:26 +03:00
Anna Shaleva
6cf785ce54 workflows: ensure autogenerated code is up-to-date
In case if source of stringers or any other autogenerated code is
updated we need to regenerate the target files. It's easy to forget
about it.

Ref. 8995f11d39cc6b5f5b0081039bbe616dd7aaf38e.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-04-25 16:36:38 +03:00
Anna Shaleva
fbe514ca91 workflows: disable cache for golangci-lint
Ref. https://github.com/golangci/golangci-lint-action/issues/135.
Otherwies we've got a set of errors on attempt to setup linter:
```
Run golangci/golangci-lint-action@v4
  with:
    version: latest
    github-token: ***
    only-new-issues: false
    skip-cache: false
    skip-pkg-cache: false
    skip-build-cache: false
    install-mode: binary
prepare environment
  Checking for go.mod: go.mod
  Received 125829120 of 781115092 (16.1%), 119.8 MBs/sec
  Received 331350016 of 781115092 (42.4%), 157.8 MBs/sec
  Received 541065216 of 781115092 (69.3%), 171.9 MBs/sec
  Received 738197504 of 781115092 (94.5%), 175.8 MBs/sec
  Cache Size: ~745 MB (781115092 B)
  /usr/bin/tar -xf /home/runner/work/_temp/6de9500e-163b-4dda-a82b-d6b2ee7b1625/cache.tzst -P -C /home/runner/work/neo-go/neo-go --use-compress-program unzstd
  Received 781115092 of 781115092 (100.0%), 148.8 MBs/sec
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/LICENSE: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/.github/workflows/test.yml: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/README.md: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/annotation_test.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/retention_test.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/main.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/fmt/m.pb.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/fmt/m.proto: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_import_all.proto: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.proto: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_b_1/m1.proto: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_b_1/m2.proto: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.proto: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.proto: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_a_1/m2.proto: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_a_2/m3.proto: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_a_2/m4.proto: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/extensions/ext/ext.proto: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/extensions/extra/extra.proto: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/extensions/proto3/ext3.proto: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/extensions/proto3/ext3.pb.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/extensions/base/base.proto: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/proto2/fields.pb.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/proto2/nested_messages.proto: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/proto2/proto2.proto: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/proto2/enum.proto: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/proto2/enum.pb.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/proto2/fields.proto: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/import_public/b.pb.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.31.0/cmd/protoc-gen-go/testdata/import_public/a.proto: Cannot open: File exists
...
```

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-04-18 19:24:30 +03:00
Roman Khimov
8c1d061446 workflows: update CodeCov action, use token for upload
It fails now without a token.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-04-09 13:39:11 +03:00
Anna Shaleva
d7ab7634ef workflows: update CodeQL version
Warning: CodeQL Action v2 will be deprecated on December 5th, 2024. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2024-01-12-code-scanning-deprecation-of-codeql-action-v2/

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-04-01 18:27:59 +03:00
Roman Khimov
54c53cf6ca workflows: give tests more time
We have more and more timeouts happening for test runs, so 10m is not enough
for busy GH machines sometime. I think we can just give them a bit more time.

Refs. #2379 though.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-03-09 14:34:40 +03:00
Roman Khimov
d31b01d4b1 workflows: workaround Go 1.22 coverage problem
See https://github.com/golang/go/issues/65653, the fix can be postponed up
to Go 1.23 and we need green.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-03-06 10:03:02 +03:00
Anna Shaleva
3f772c2711 workflows: use newer Go 1.22, drop Go 1.19
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-03-05 11:43:23 +03:00
Anna Shaleva
c660a6e8f3 workflows: remove cache argument from setup-go action
`actions/setup-go@v5` doesn't have `cache` argument.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-03-05 11:43:23 +03:00
Anna Shaleva
90db72abc9 workflows: upgrade runners
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-03-05 11:42:53 +03:00
Roman Khimov
630bd29b8d workflows: drop manual go mod downloads
It's done automatically since like forever, these steps are useless.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-02-28 12:09:15 +03:00
Roman Khimov
5fcae176b8 workflows: add MacOS 14 runner for tests
It's ARM-based, so it's a very nice combination.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-02-28 12:08:13 +03:00
Anna Shaleva
8ab08c6221 github: reorder actions/checkout and actions/setup-go steps
Otherwise setup-go action won't work with go-version-file. Ref.
https://github.com/actions/setup-go/issues/340.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-02-27 11:56:49 +03:00
Anna Shaleva
a81804e296 .github: use minimum required Go version from go.mod
For linter job only, port
e0ec4d24cb.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-02-27 11:39:51 +03:00
Roman Khimov
07b2de73cd workflows: update actions
I'm tired of warnings for our workflow runs.

The only unupdated is Codecov, we can't switch to token-based uploads at the
moment (and it's required for new version).

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-02-19 22:14:24 +03:00
Ekaterina Pavlova
cab358dba1 github: enable amd64 builds for osx
Enable AMD64 builds for Intel based OSX.

Closes #3238.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2023-12-05 21:49:10 +03:00
Anna Shaleva
45dcf38563 .github, Dockerfiles: bump minimum\maximum go versions
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-12 13:28:59 +03:00
Anna Shaleva
bb9b8368a8 .github: upgrade coverage uploading action
Currently it's failing, but no token is required for public repos:
```
[2023-10-10T10:35:11.917Z] ['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
```

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-10 13:53:20 +03:00
Anna Shaleva
f330aaf313 .github: rename testing workflow file
Make it unified with the rest of workflow files.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-31 11:20:10 +03:00
Anna Shaleva
c80702cc4a .github: prettify DCO check display name
Extend the YAML scope and prettify the job check name.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-31 11:17:43 +03:00
Roman Khimov
1863b79c5c workflows: reuse org-wide DCO workflow
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-08-29 14:59:53 +03:00
Anna Shaleva
3608314c15 .github: enable submodules sync for actions/checkout@v3
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-10 12:54:07 +03:00
Anna Shaleva
778ddfb277 github: automatically attach binaries to the release
Close #3001.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-10 19:39:45 +03:00
Anna Shaleva
98d29570d3 github: use minimum supported go version for Linter job
It should be this way because we can't provide some features golangci-lint
require us to do due to the need to support not only the latest Go version,
but also two versions below.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-04-28 12:17:08 +03:00
Roman Khimov
ce7658ef82
Merge pull request #2711 from aprasolova/dco-check
[nspcc-dev/nspcc-infra#840]: Add DCO check
2023-04-06 11:11:09 +03:00
Anna Shaleva
3f6a88c239 .github: bump setup-go version from v3 to v4 2023-03-31 10:20:57 +03:00
Anna Shaleva
110356857d *: drop go 1.17 support for github actions and tests
And support go 1.20 for github workflows.
2023-03-31 10:20:56 +03:00
Anna Shaleva
eaa0d42b9c .github: fix condition for adding latest tag to buider job 2022-11-15 16:16:02 +03:00
Anna Shaleva
59741bbffc .github: update deprecated workflows 2022-11-15 16:16:01 +03:00
Anna Shaleva
cd7cd02c33 .github: exclude macOS amd64 binary from build CLI job 2022-10-06 08:51:37 +03:00
Anna Shaleva
a9d32fe8f6 .github: give proper names to CLI binaries and artifact archives 2022-10-06 07:39:31 +03:00
anastasia prasolova
2093bf806f [nspcc-dev/nspcc-infra#840]: Add DCO check
Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
2022-09-22 19:29:14 +03:00
Anna Shaleva
c3670fecc5 github: update linter job
Use the latest linter action and explicitly setup go version.
2022-08-09 15:47:18 +03:00
Anna Shaleva
fc3aa7f181 ci: update workflows' go version 2022-08-09 15:37:59 +03:00
Anna Shaleva
40788db960 .github: adjust image builder job
Don't need to check runner OS, because it's ubuntu-20.04. Remnant from
b8b85ce911.
2022-08-02 12:02:37 +03:00
Roman Khimov
e11503ff5b Makefile: correct Docker image repository name
Fix 403 Forbidden errors on push.
2022-07-21 17:35:48 +03:00
Roman Khimov
b8fe915797 workflows: use path context for docker builds
We have to checkout anyway for setvars step, so we can reuse the data instead
of making yet another checkout.
2022-07-21 16:27:34 +03:00
Roman Khimov
913dea84af workflows: don't login to Docker Hub when not pushing images
Minor safety improvement, images are not pushed anyway in this case, but it
makes little sense logging in as well.
2022-07-21 15:32:00 +03:00
Roman Khimov
ec77e8a4fa workflows: use checkout@v3
No functional changes, but let's be up to date.
2022-07-20 19:21:40 +03:00
Roman Khimov
cbf6a2940f workflows: update setup-go to v3
Use built-in cache, simplify steps.
2022-07-20 19:19:51 +03:00