-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from nspcc-dev/63-missing-stable-releases
Updating to the latest modules
- Loading branch information
Showing
14 changed files
with
750 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
k6 | ||
xk6-neofs | ||
*.bolt | ||
presets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.