Skip to content

Commit

Permalink
Merge pull request #64 from nspcc-dev/63-missing-stable-releases
Browse files Browse the repository at this point in the history
Updating to the latest modules
  • Loading branch information
roman-khimov authored Sep 20, 2023
2 parents f59de11 + 132478b commit f918865
Show file tree
Hide file tree
Showing 14 changed files with 750 additions and 260 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build

on:
pull_request:
branches:
- master
types: [ opened, synchronize ]
paths-ignore:
- '**/*.md'
push:
# Build for the master branch.
branches:
- master
release:
# Publish released commit as Docker `latest` and `git_revision` images.
types:
- published

jobs:
build_cli:
name: Build CLI
runs-on: ${{matrix.os.name}}
strategy:
matrix:
os: [ { name: ubuntu-20.04, bin-name: linux } ]
arch: [ amd64 ]

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: true

- name: Update Go modules
run: go mod download -json

- name: Build CLI
run: make
env:
GOARCH: ${{ matrix.arch }}

- name: Rename CLI binary
run: mv ./xk6-neofs* ./xk6-neofs-${{ matrix.os.bin-name }}-${{ matrix.arch }}

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: xk6-neofs-${{ matrix.os.bin-name }}-${{ matrix.arch }}
path: ./xk6-neofs*
if-no-files-found: error

- name: Attach binary to the release as an asset
if: ${{ github.event_name == 'release' }}
run: gh release upload ${{ github.event.release.tag_name }} ./xk6-neofs-${{ matrix.os.bin-name }}-${{ matrix.arch }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
k6
xk6-neofs
*.bolt
presets
56 changes: 56 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This file contains all available configuration options
# with their default values.

# options for analysis running
run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 5m

# include test files or not, default is true
tests: true

# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: tab

# all available settings of specific linters
linters-settings:
exhaustive:
# indicates that switch statements are to be considered exhaustive if a
# 'default' case is present, even if all enum members aren't listed in the
# switch
default-signifies-exhaustive: true
govet:
# report about shadowed variables
check-shadowing: false

linters:
enable:
# mandatory linters
- govet
- revive

# some default golangci-lint linters
- errcheck
- gosimple
- ineffassign
- staticcheck
- typecheck
- unused

# extra linters
- exhaustive
- godot
- gofmt
- whitespace
- goimports
disable-all: true
fast: false

issues:
include:
- EXC0002 # should have a comment
- EXC0003 # test/Test ... consider calling this
- EXC0004 # govet
- EXC0005 # C-style breaks
32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/make -f

export GOBIN ?= $(shell pwd)/bin
BINARY=xk6-neofs
XK6_VERSION=0.9.2
VERSION ?= $(shell git describe --tags --match "v*" --abbrev=8 2>/dev/null | sed -r 's,^v([0-9]+\.[0-9]+)\.([0-9]+)(-.*)?$$,\1 \2 \3,' | while read mm patch suffix; do if [ -z "$$suffix" ]; then echo $$mm.$$patch; else patch=`expr $$patch + 1`; echo $$mm.$${patch}-pre$$suffix; fi; done)
LDFLAGS:=-s -w -X 'go.k6.io/k6/lib/consts.VersionDetails=xk6-neofs-$(VERSION)'

# Build xk6-neofs binary
build: install_xk6
@echo "=> Building binary"
@XK6_BUILD_FLAGS="-ldflags '$(LDFLAGS)'" $(GOBIN)/xk6 build --with github.com/nspcc-dev/xk6-neofs=. --output $(BINARY)

# Install required utils
install_xk6:
@echo "=> Installing utils"
@go install go.k6.io/xk6/cmd/xk6@v$(XK6_VERSION)

# Run tests
test:
@go test ./... -cover

# Run linters
lint:
@golangci-lint --timeout=5m run

# Reformat code
format:
@echo "⇒ Processing gofmt check"
@gofmt -s -w ./
@echo "⇒ Processing goimports check"
@goimports -w ./
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ To build a `k6` binary with this extension, first ensure you have the prerequisi
- Go
- Git

1. Install `xk6` framework for extending `k6`:
1. Clone this repository
```shell
go install go.k6.io/xk6/cmd/xk6@latest
git clone github.com/nspcc-dev/xk6-neofs
cd xk6-neofs
```

2. Clone this repository
2. Install `xk6` framework for extending `k6`:
```shell
git clone github.com/nspcc-dev/xk6-neofs
cd xk6-neofs
make install_xk6
```

3. Build the binary:
```shell
xk6 build --with github.com/nspcc-dev/xk6-neofs=.
make build
```

4. Run k6:
```shell
./k6 run test-script.js
./xk6-neofs run test-script.js
```

# API
Expand Down
98 changes: 51 additions & 47 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,68 +3,72 @@ module github.com/nspcc-dev/xk6-neofs
go 1.18

require (
github.com/aws/aws-sdk-go-v2 v1.16.3
github.com/aws/aws-sdk-go-v2/config v1.15.5
github.com/aws/aws-sdk-go-v2/service/s3 v1.26.9
github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf
github.com/google/uuid v1.3.0
github.com/nspcc-dev/neo-go v0.100.1
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.9
github.com/aws/aws-sdk-go-v2 v1.21.0
github.com/aws/aws-sdk-go-v2/config v1.18.39
github.com/aws/aws-sdk-go-v2/service/s3 v1.38.5
github.com/dop251/goja v0.0.0-20230828202809-3dbe69dd2b8e
github.com/google/uuid v1.3.1
github.com/nspcc-dev/neo-go v0.102.0
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20230912200451-c0eefd5bd81c
github.com/nspcc-dev/tzhash v1.7.0
github.com/stretchr/testify v1.8.1
go.etcd.io/bbolt v1.3.6
go.k6.io/k6 v0.38.2
github.com/stretchr/testify v1.8.4
go.etcd.io/bbolt v1.3.7
go.k6.io/k6 v0.46.0
)

require (
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20221202181307-76fa05c21b12 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.12.0 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.5 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.11.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.16.4 // indirect
github.com/aws/smithy-go v1.11.2 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.37 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.13.6 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect
github.com/aws/smithy-go v1.14.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/dlclark/regexp2 v1.10.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/go-sourcemap/sourcemap v2.1.4-0.20211119122758-180fcef48034+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/hashicorp/golang-lru v0.6.0 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/pprof v0.0.0-20230912144702-c363fe2c2ed8 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/mstoykov/atlas v0.0.0-20220811071828-388f114305dd // indirect
github.com/nspcc-dev/hrw v1.0.9 // indirect
github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 // indirect
github.com/nspcc-dev/neofs-crypto v0.4.0 // indirect
github.com/nspcc-dev/rfc6979 v0.2.0 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.20.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/serenize/snaker v0.0.0-20201027110005-a7ad2135616e // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/afero v1.1.2 // indirect
golang.org/x/crypto v0.4.0 // indirect
golang.org/x/exp v0.0.0-20221227203929-1b447090c38c // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
google.golang.org/genproto v0.0.0-20200903010400-9bfcb5116336 // indirect
google.golang.org/grpc v1.48.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/guregu/null.v3 v3.3.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230911183012-2d3300fd4832 // indirect
google.golang.org/grpc v1.58.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/guregu/null.v3 v3.5.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit f918865

Please sign in to comment.