From 82026c3c49937e24a014a8edf9c8715305d9c262 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 21:48:01 -0700 Subject: [PATCH 01/13] add github action Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 77 +++++++++++++++++++++ Makefile | 10 +-- format/logcache/logcache_generated.go | 20 ------ format/logsnapshot/logsnapshot_generated.go | 36 ---------- 4 files changed, 83 insertions(+), 60 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..d072cb0e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,77 @@ +name: build +on: + push: + tags: + - v* + branches: + - main + pull_request: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +env: + # renovate: datasource=go depName=github.com/golangci/golangci-lint + GOLANGCI_LINT_VERSION: v1.52.2 + +jobs: + spellcheck: + name: Spell Check + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v2 + + - name: Check spelling of Go files + uses: crate-ci/typos@master + with: + files: '*.go' + write_changes: true + + golangci-lint: + name: Go Lint + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version-file: .go-version + check-latest: true + cache: true + + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: ${{ env.GOLANGCI_LINT_VERSION }} + args: --timeout 5m + + test: + name: Go Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20.4' + check-latest: true + + - name: Install Go tip + run: | + curl -sL https://storage.googleapis.com/go-build-snap/go/linux-amd64/$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1;}').tar.gz -o gotip.tar.gz + ls -lah gotip.tar.gz + mkdir -p $HOME/gotip + tar -C $HOME/gotip -xzf gotip.tar.gz + + - name: Build test programs + run: make testdata GO=$HOME/gotip/bin/go + + - name: Test + run: make test diff --git a/Makefile b/Makefile index 471230c3..7838e556 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ .PHONY: clean flatbuffers generate test testdata .PRECIOUS: %.wasm +GO ?= go + testdata.go.src = $(wildcard testdata/go/*.go) testdata.go.wasm = $(testdata.go.src:.go=.wasm) @@ -16,7 +18,7 @@ timecraft.src.go = \ $(wildcard internal/*/*.go) timecraft: go.mod $(timecraft.src.go) - go build -o timecraft + $(GO) build -o timecraft clean: rm -f timecraft $(format.src.go) $(testdata.go.wasm) @@ -24,15 +26,15 @@ clean: generate: flatbuffers flatbuffers: go.mod $(format.src.go) - go build ./format/... + $(GO) build ./format/... test: flatbuffers testdata - go test -v ./... + $(GO) test -v ./... testdata: $(testdata.go.wasm) testdata/go/%.wasm: testdata/go/%.go - GOARCH=wasm GOOS=wasip1 gotip build -o $@ $< + GOARCH=wasm GOOS=wasip1 $(GO) build -o $@ $< # We run goimports because the flatc compiler sometimes adds an unused import of # strconv. diff --git a/format/logcache/logcache_generated.go b/format/logcache/logcache_generated.go index b7d0b379..ba67dd00 100644 --- a/format/logcache/logcache_generated.go +++ b/format/logcache/logcache_generated.go @@ -13,8 +13,6 @@ type RecordSet struct { _tab flatbuffers.Table } -const RecordSetIdentifier = "TL.3" - func GetRootAsRecordSet(buf []byte, offset flatbuffers.UOffsetT) *RecordSet { n := flatbuffers.GetUOffsetT(buf[offset:]) x := &RecordSet{} @@ -22,15 +20,6 @@ func GetRootAsRecordSet(buf []byte, offset flatbuffers.UOffsetT) *RecordSet { return x } -func FinishRecordSetBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { - identifierBytes := []byte(RecordSetIdentifier) - builder.FinishWithFileIdentifier(offset, identifierBytes) -} - -func RecordSetBufferHasIdentifier(buf []byte) bool { - return flatbuffers.BufferHasIdentifier(buf, RecordSetIdentifier) -} - func GetSizePrefixedRootAsRecordSet(buf []byte, offset flatbuffers.UOffsetT) *RecordSet { n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) x := &RecordSet{} @@ -38,15 +27,6 @@ func GetSizePrefixedRootAsRecordSet(buf []byte, offset flatbuffers.UOffsetT) *Re return x } -func FinishSizePrefixedRecordSetBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { - identifierBytes := []byte(RecordSetIdentifier) - builder.FinishSizePrefixedWithFileIdentifier(offset, identifierBytes) -} - -func SizePrefixedRecordSetBufferHasIdentifier(buf []byte) bool { - return flatbuffers.SizePrefixedBufferHasIdentifier(buf, RecordSetIdentifier) -} - func (rcv *RecordSet) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i diff --git a/format/logsnapshot/logsnapshot_generated.go b/format/logsnapshot/logsnapshot_generated.go index 65161f0e..9b45121c 100644 --- a/format/logsnapshot/logsnapshot_generated.go +++ b/format/logsnapshot/logsnapshot_generated.go @@ -12,8 +12,6 @@ type RecordRange struct { _tab flatbuffers.Table } -const RecordRangeIdentifier = "TL.1" - func GetRootAsRecordRange(buf []byte, offset flatbuffers.UOffsetT) *RecordRange { n := flatbuffers.GetUOffsetT(buf[offset:]) x := &RecordRange{} @@ -21,15 +19,6 @@ func GetRootAsRecordRange(buf []byte, offset flatbuffers.UOffsetT) *RecordRange return x } -func FinishRecordRangeBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { - identifierBytes := []byte(RecordRangeIdentifier) - builder.FinishWithFileIdentifier(offset, identifierBytes) -} - -func RecordRangeBufferHasIdentifier(buf []byte) bool { - return flatbuffers.BufferHasIdentifier(buf, RecordRangeIdentifier) -} - func GetSizePrefixedRootAsRecordRange(buf []byte, offset flatbuffers.UOffsetT) *RecordRange { n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) x := &RecordRange{} @@ -37,15 +26,6 @@ func GetSizePrefixedRootAsRecordRange(buf []byte, offset flatbuffers.UOffsetT) * return x } -func FinishSizePrefixedRecordRangeBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { - identifierBytes := []byte(RecordRangeIdentifier) - builder.FinishSizePrefixedWithFileIdentifier(offset, identifierBytes) -} - -func SizePrefixedRecordRangeBufferHasIdentifier(buf []byte) bool { - return flatbuffers.SizePrefixedBufferHasIdentifier(buf, RecordRangeIdentifier) -} - func (rcv *RecordRange) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i @@ -317,10 +297,6 @@ func GetRootAsOpenFile(buf []byte, offset flatbuffers.UOffsetT) *OpenFile { return x } -func FinishOpenFileBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { - builder.Finish(offset) -} - func GetSizePrefixedRootAsOpenFile(buf []byte, offset flatbuffers.UOffsetT) *OpenFile { n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) x := &OpenFile{} @@ -328,10 +304,6 @@ func GetSizePrefixedRootAsOpenFile(buf []byte, offset flatbuffers.UOffsetT) *Ope return x } -func FinishSizePrefixedOpenFileBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { - builder.FinishSizePrefixed(offset) -} - func (rcv *OpenFile) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i @@ -400,10 +372,6 @@ func GetRootAsOpenHandle(buf []byte, offset flatbuffers.UOffsetT) *OpenHandle { return x } -func FinishOpenHandleBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { - builder.Finish(offset) -} - func GetSizePrefixedRootAsOpenHandle(buf []byte, offset flatbuffers.UOffsetT) *OpenHandle { n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) x := &OpenHandle{} @@ -411,10 +379,6 @@ func GetSizePrefixedRootAsOpenHandle(buf []byte, offset flatbuffers.UOffsetT) *O return x } -func FinishSizePrefixedOpenHandleBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { - builder.FinishSizePrefixed(offset) -} - func (rcv *OpenHandle) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i From 1eabf43b604380a04232201023a0a6f4045c42b7 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 21:48:57 -0700 Subject: [PATCH 02/13] v4 => v3 Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d072cb0e..28eb5dd9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,10 +55,10 @@ jobs: name: Go Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v3 with: go-version: '1.20.4' check-latest: true From 021c26900c852cfbaa5bbf46374c33da090603bd Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 21:49:49 -0700 Subject: [PATCH 03/13] v3 => v4 Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28eb5dd9..2acc02c8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,7 +58,7 @@ jobs: - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: '1.20.4' check-latest: true From 91d03e07a2d2b3d89efe664629c6ab1a99488556 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 21:52:52 -0700 Subject: [PATCH 04/13] fix lint and test jobs Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2acc02c8..4cc77153 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,11 +39,10 @@ jobs: - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version-file: .go-version + go-version-file: go.mod check-latest: true - cache: true - name: golangci-lint uses: golangci/golangci-lint-action@v3 @@ -60,7 +59,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.20.4' + go-version-file: go.mod check-latest: true - name: Install Go tip From bae036ddbfa395850ee683b601bff0386afe0a91 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 22:02:01 -0700 Subject: [PATCH 05/13] try to allow access to private repositories Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4cc77153..61e10915 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,7 @@ concurrency: env: # renovate: datasource=go depName=github.com/golangci/golangci-lint GOLANGCI_LINT_VERSION: v1.52.2 + GOPRIVATE: github.com/stealthrocket/* jobs: spellcheck: @@ -54,6 +55,11 @@ jobs: name: Go Test runs-on: ubuntu-latest steps: + - name: Configure git for private modules + env: + TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }} + run: git config --global url."https://stealthrocket:${TOKEN}@github.com".insteadOf "https://github.com" + - uses: actions/checkout@v3 - name: Set up Go From 4fa2c4a4464d6ebe96a6bca832199543340d968f Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 22:07:45 -0700 Subject: [PATCH 06/13] change GOPRIVATE Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 61e10915..8000cc7c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ concurrency: env: # renovate: datasource=go depName=github.com/golangci/golangci-lint GOLANGCI_LINT_VERSION: v1.52.2 - GOPRIVATE: github.com/stealthrocket/* + GOPRIVATE: github.com/stealthrocket jobs: spellcheck: From f23f693523cd28961fd3bae774772cf147918917 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 22:11:24 -0700 Subject: [PATCH 07/13] refactor build workflow Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8000cc7c..3c66c78f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,9 +14,8 @@ concurrency: cancel-in-progress: true env: - # renovate: datasource=go depName=github.com/golangci/golangci-lint - GOLANGCI_LINT_VERSION: v1.52.2 GOPRIVATE: github.com/stealthrocket + GH_ACCESS_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }} jobs: spellcheck: @@ -24,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Actions Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Check spelling of Go files uses: crate-ci/typos@master @@ -45,21 +44,18 @@ jobs: go-version-file: go.mod check-latest: true + - run: git config --global url.https://stealthrocket:$GH_ACCESS_TOKEN@github.com.insteadOf https://github.com + - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: ${{ env.GOLANGCI_LINT_VERSION }} + version: v1.52.2 args: --timeout 5m test: name: Go Test runs-on: ubuntu-latest steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }} - run: git config --global url."https://stealthrocket:${TOKEN}@github.com".insteadOf "https://github.com" - - uses: actions/checkout@v3 - name: Set up Go @@ -75,8 +71,6 @@ jobs: mkdir -p $HOME/gotip tar -C $HOME/gotip -xzf gotip.tar.gz - - name: Build test programs - run: make testdata GO=$HOME/gotip/bin/go - - - name: Test - run: make test + - run: git config --global url.https://stealthrocket:$GH_ACCESS_TOKEN@github.com.insteadOf https://github.com + - run: make testdata GO=$HOME/gotip/bin/go + - run: make test From b044cd1a25eeb06e4e2930d5149171563489ccf4 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 22:25:37 -0700 Subject: [PATCH 08/13] remove username in github url Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c66c78f..39bfb98c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: go-version-file: go.mod check-latest: true - - run: git config --global url.https://stealthrocket:$GH_ACCESS_TOKEN@github.com.insteadOf https://github.com + - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com.insteadOf https://github.com - name: golangci-lint uses: golangci/golangci-lint-action@v3 From d9af5114882860ae42c963aa21d3e797efab43cf Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 22:31:25 -0700 Subject: [PATCH 09/13] remove username in github url Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 39bfb98c..c1c9abc7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,6 +71,6 @@ jobs: mkdir -p $HOME/gotip tar -C $HOME/gotip -xzf gotip.tar.gz - - run: git config --global url.https://stealthrocket:$GH_ACCESS_TOKEN@github.com.insteadOf https://github.com + - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com.insteadOf https://github.com - run: make testdata GO=$HOME/gotip/bin/go - run: make test From 2c52e080b51dabd3b51dd80432af791d307db13d Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 22:34:22 -0700 Subject: [PATCH 10/13] try with GITHUB_TOKEN Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1c9abc7..4e4fc5d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,7 @@ concurrency: env: GOPRIVATE: github.com/stealthrocket GH_ACCESS_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: spellcheck: @@ -71,6 +72,6 @@ jobs: mkdir -p $HOME/gotip tar -C $HOME/gotip -xzf gotip.tar.gz - - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com.insteadOf https://github.com + - run: git config --global url.https://$GITHUB_TOKEN@github.com.insteadOf https://github.com - run: make testdata GO=$HOME/gotip/bin/go - run: make test From 6b63a71c0c056f8a9864cd39cbdab996a2f9e692 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 22:37:20 -0700 Subject: [PATCH 11/13] try moving the env to the test job Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e4fc5d1..97db09d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,11 +13,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.number || github.ref }} cancel-in-progress: true -env: - GOPRIVATE: github.com/stealthrocket - GH_ACCESS_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - jobs: spellcheck: name: Spell Check @@ -45,8 +40,6 @@ jobs: go-version-file: go.mod check-latest: true - - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com.insteadOf https://github.com - - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: @@ -56,6 +49,9 @@ jobs: test: name: Go Test runs-on: ubuntu-latest + env: + GOPRIVATE: github.com/stealthrocket + GH_ACCESS_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }} steps: - uses: actions/checkout@v3 @@ -72,6 +68,6 @@ jobs: mkdir -p $HOME/gotip tar -C $HOME/gotip -xzf gotip.tar.gz - - run: git config --global url.https://$GITHUB_TOKEN@github.com.insteadOf https://github.com + - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com.insteadOf https://github.com - run: make testdata GO=$HOME/gotip/bin/go - run: make test From c1ab8a408a9de3617df01f0ae853bec5a58bd036 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 22:41:37 -0700 Subject: [PATCH 12/13] try with other PAT Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97db09d8..7d83b1a2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.number || github.ref }} cancel-in-progress: true +env: + GOPRIVATE: github.com/stealthrocket + GH_ACCESS_TOKEN: ${{ secrets.PAT }} + jobs: spellcheck: name: Spell Check @@ -49,9 +53,6 @@ jobs: test: name: Go Test runs-on: ubuntu-latest - env: - GOPRIVATE: github.com/stealthrocket - GH_ACCESS_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }} steps: - uses: actions/checkout@v3 From df19292d1e182e192fde86975f31da262ae69a64 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 22:46:00 -0700 Subject: [PATCH 13/13] disable the jobs for now Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 78 ++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7d83b1a2..f4575746 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ concurrency: env: GOPRIVATE: github.com/stealthrocket - GH_ACCESS_TOKEN: ${{ secrets.PAT }} + GH_ACCESS_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }} jobs: spellcheck: @@ -31,44 +31,50 @@ jobs: files: '*.go' write_changes: true - golangci-lint: - name: Go Lint - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v3 + # TODO: golangci-lint does not work well with the dot-import of wasi-go, + # it fails to find the symbols; maybe related to not being able to download + # private dependencies? + # + # golangci-lint: + # name: Go Lint + # runs-on: ubuntu-latest + # timeout-minutes: 30 + # steps: + # - uses: actions/checkout@v3 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version-file: go.mod - check-latest: true + # - name: Set up Go + # uses: actions/setup-go@v4 + # with: + # go-version-file: go.mod + # check-latest: true - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.52.2 - args: --timeout 5m + # - name: golangci-lint + # uses: golangci/golangci-lint-action@v3 + # with: + # version: v1.52.2 + # args: --timeout 5m - test: - name: Go Test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + # TODO: figure out why the private access token is not working + # + # test: + # name: Go Test + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version-file: go.mod - check-latest: true + # - name: Set up Go + # uses: actions/setup-go@v4 + # with: + # go-version-file: go.mod + # check-latest: true - - name: Install Go tip - run: | - curl -sL https://storage.googleapis.com/go-build-snap/go/linux-amd64/$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1;}').tar.gz -o gotip.tar.gz - ls -lah gotip.tar.gz - mkdir -p $HOME/gotip - tar -C $HOME/gotip -xzf gotip.tar.gz + # - name: Install Go tip + # run: | + # curl -sL https://storage.googleapis.com/go-build-snap/go/linux-amd64/$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1;}').tar.gz -o gotip.tar.gz + # ls -lah gotip.tar.gz + # mkdir -p $HOME/gotip + # tar -C $HOME/gotip -xzf gotip.tar.gz - - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com.insteadOf https://github.com - - run: make testdata GO=$HOME/gotip/bin/go - - run: make test + # - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com.insteadOf https://github.com + # - run: make testdata GO=$HOME/gotip/bin/go + # - run: make test