Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade dependencies #9

Merged
merged 6 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: "~1.22.8"

- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Lint Go Code
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.50.1
version: v1.57.2
args: --timeout=30m
install-mode: binary

- name: Run Unit tests.
run: go test ./...

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v6
with:
version: latest
version: "2.0.1"
args: build --snapshot --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 9 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: "~1.22.8"

- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Lint Go Code
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.50.1
version: v1.57.2
args: --timeout=30m
install-mode: binary

- name: Run Unit tests.
run: go test ./...
Expand All @@ -57,9 +59,9 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v6
with:
version: latest
version: "2.0.1"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ linters:
- ifshort
- golint
- deadcode
- depguard
- tagalign

linters-settings:
lll:
Expand Down
3 changes: 3 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

project_name: xk6bundler
version: 2

before:
hooks:
- go mod download
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.goreleaser
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

FROM golang:1.20.7-bullseye
FROM golang:1.22.8-bullseye

COPY xk6bundler /usr/local/bin/
COPY docker-entrypoint.sh /usr/local/bin/
Expand Down
3 changes: 1 addition & 2 deletions cmd/xk6bundler/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"context"
_ "embed"
"io"
"io/ioutil"
"os"
"path/filepath"
"text/template"
Expand Down Expand Up @@ -107,7 +106,7 @@ func createDockerfile(output string) error {

const fileMode = 0o644

return ioutil.WriteFile(name, []byte(str), fileMode)
return os.WriteFile(name, []byte(str), fileMode)
}

func createArchive(archive string, output string) error {
Expand Down
1 change: 1 addition & 0 deletions cmd/xk6bundler/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ func splitWith(arg string) (module, version, replace string, err error) {
} else {
version = parts[1]
parts := strings.SplitN(version, replaceSplit, versionParts)

if len(parts) > 1 {
version = parts[0]
replace = parts[1]
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/szkiba/xk6bundler

go 1.18
go 1.22

require (
github.com/go-task/slim-sprig v2.20.0+incompatible
github.com/jessevdk/go-flags v1.5.0
gitlab.com/golang-commonmark/markdown v0.0.0-20211110145824-bf3e522c626a
go.k6.io/xk6 v0.9.0
go.k6.io/xk6 v0.13.0
gopkg.in/ini.v1 v1.67.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ gitlab.com/golang-commonmark/puny v0.0.0-20191124015043-9f83538fa04f h1:Wku8eEde
gitlab.com/golang-commonmark/puny v0.0.0-20191124015043-9f83538fa04f/go.mod h1:Tiuhl+njh/JIg0uS/sOJVYi0x2HEa5rc1OAaVsb5tAs=
gitlab.com/opennota/wd v0.0.0-20180912061657-c5d65f63c638 h1:uPZaMiz6Sz0PZs3IZJWpU5qHKGNy///1pacZC9txiUI=
gitlab.com/opennota/wd v0.0.0-20180912061657-c5d65f63c638/go.mod h1:EGRJaqe2eO9XGmFtQCvV3Lm9NLico3UhFwUpCG/+mVU=
go.k6.io/xk6 v0.9.0 h1:6ihaW4Qsi+Lh3FB6PWwg6Qq+Z6uf4wnkib90smsMTGs=
go.k6.io/xk6 v0.9.0/go.mod h1:4+BwjriwZ52roJ9RHHQhTBb9Q6ZctEUtsCO10H8rJIo=
go.k6.io/xk6 v0.13.0 h1:DY6xgBdf1BFwyDVPuFgJTYVaXc9KMuC9ioCKBi1HZVg=
go.k6.io/xk6 v0.13.0/go.mod h1:4+BwjriwZ52roJ9RHHQhTBb9Q6ZctEUtsCO10H8rJIo=
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
Loading