Skip to content

Commit

Permalink
Merge branch 'fix-bigmap-type-detection' into fix-bigmap-detection-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
huancheng-trili committed Sep 9, 2024
2 parents 47ba993 + 3190f10 commit b3b649c
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 7 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and run test

on:
pull_request:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.19', '1.20', '1.21', '1.22' ]

steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: go get ./...
- name: Run gofmt
run: |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
echo "Some files are not correctly formatted. Run 'gofmt -l -w'."
exit 1
fi
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.3
- name: Build
run: go build -v ./...
- name: Test with Go
run: go test -json ./... > TestResults-${{ matrix.go-version }}.json
- name: Upload Go test results
uses: actions/upload-artifact@v4
with:
name: Go-results-${{ matrix.go-version }}
path: TestResults-${{ matrix.go-version }}.json
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ linters:
enable:
- bodyclose
- durationcheck
- exportloopref
- copyloopvar
- gomoddirectives
- prealloc
- reassign
Expand Down
2 changes: 1 addition & 1 deletion examples/contract/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ func balance_of(ctx context.Context, c *rpc.Client, addr, owner, id string) erro
return err
}
req := []contract.FA2BalanceRequest{
contract.FA2BalanceRequest{
{
Owner: own,
TokenId: tezos.NewZ(i),
},
Expand Down
2 changes: 1 addition & 1 deletion examples/tzgen/FA2NFT.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/tzgen/Hello.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/tzgen/Payable.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/compose/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package compose
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/http/httputil"
"strings"
Expand Down Expand Up @@ -44,7 +44,7 @@ func Fetch[T any](ctx Context, url string) (*T, error) {
return nil, fmt.Errorf("request failed: %s ", res.Status)
}
defer res.Body.Close()
buf, err := ioutil.ReadAll(res.Body)
buf, err := io.ReadAll(res.Body)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit b3b649c

Please sign in to comment.