From 71f785edea8af92d03f71fd384a177d5d4f73b76 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 22:51:32 -0700 Subject: [PATCH 1/5] github actions: second attempt Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 40 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f4575746..eeb0f3e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,27 +54,25 @@ jobs: # version: v1.52.2 # args: --timeout 5m - # TODO: figure out why the private access token is not working - # - # test: - # name: Go Test - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 + 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 From 12a4b523db08bf2a5dd650ad7ffe87cae589543e Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 22:54:13 -0700 Subject: [PATCH 2/5] use UTC timezone so tests pass in CI Signed-off-by: Achille Roussel --- internal/timemachine/registry_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/timemachine/registry_test.go b/internal/timemachine/registry_test.go index 35aeb5e0..b9af4cae 100644 --- a/internal/timemachine/registry_test.go +++ b/internal/timemachine/registry_test.go @@ -64,7 +64,7 @@ func TestRegistry(t *testing.T) { (*timemachine.Registry).LookupProcess, &format.Process{ ID: uuid.New(), - StartTime: time.Unix(1685053878, 0), + StartTime: time.Unix(1685053878, 0).UTC(), Config: &format.Descriptor{ MediaType: format.TypeTimecraftConfig, Digest: format.SHA256([]byte("whatever")), From 26ea8bee51dc4ca21d7dc1fb879758551835c354 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 22:57:05 -0700 Subject: [PATCH 3/5] try re-enabling golangci-lint Signed-off-by: Achille Roussel --- .github/workflows/build.yml | 49 ++++++++++++++----------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eeb0f3e0..785feb27 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,46 +22,35 @@ jobs: name: Spell Check runs-on: ubuntu-latest steps: - - name: Checkout Actions Repository - uses: actions/checkout@v3 - - - name: Check spelling of Go files - uses: crate-ci/typos@master + - uses: actions/checkout@v3 + - uses: crate-ci/typos@master with: files: '*.go' write_changes: true - # 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: golangci-lint - # uses: golangci/golangci-lint-action@v3 - # with: - # version: v1.52.2 - # args: --timeout 5m + golangci-lint: + name: Go Lint + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version-file: go.mod + check-latest: true + - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com.insteadOf https://github.com + - run: go mod download + - 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 - - - name: Set up Go - uses: actions/setup-go@v4 + - uses: actions/setup-go@v4 with: go-version-file: go.mod check-latest: true From 8f5f57e7b1efe05e8a93e9a21cee2f1b989940eb Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 23:00:11 -0700 Subject: [PATCH 4/5] update README Signed-off-by: Achille Roussel --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b266eb5..d99471ae 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # timecraft -Software runtime making distributed systems simple and scalable +--- + +[![Build](https://github.com/stealthrocket/wzprof/actions/workflows/build.yml/badge.svg)](https://github.com/stealthrocket/wzprof/actions/workflows/build.yml) + +The WebAssembly Time Machine From b2cd9f0829aa07744bc0a640f7c5e1e2b1f48ec5 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 26 May 2023 23:02:03 -0700 Subject: [PATCH 5/5] [skip ci] update README Signed-off-by: Achille Roussel --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index d99471ae..06d9eebe 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # timecraft ---- - [![Build](https://github.com/stealthrocket/wzprof/actions/workflows/build.yml/badge.svg)](https://github.com/stealthrocket/wzprof/actions/workflows/build.yml) The WebAssembly Time Machine