From aafd18167a80747045c023da6adbcc2d36e226f3 Mon Sep 17 00:00:00 2001 From: Jimmy Moore Date: Tue, 23 Jan 2024 17:12:59 +0000 Subject: [PATCH] Added unit test workflow --- .github/workflows/tests.yaml | 41 ++++++++++++++++++++++++++++++++++++ pkg/storage/migrator.go | 6 ------ 2 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 00000000..58cda9eb --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,41 @@ +name: Tests + +on: + push: + branches: + - "*" + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - id: go-cache-paths + run: | + echo "::set-output name=go-build::$(go env GOCACHE)" + echo "::set-output name=go-mod::$(go env GOMODCACHE)" + + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.20.2 + + - name: Go Build Cache + uses: actions/cache@v2 + with: + path: ${{ steps.go-cache-paths.outputs.go-build }} + key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} + + - name: Go Mod Cache + uses: actions/cache@v2 + with: + path: ${{ steps.go-cache-paths.outputs.go-mod }} + key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} + + - name: Test + run: go test -v ./... + + - name: Test with Race Conditions + run: go test -race -v ./... diff --git a/pkg/storage/migrator.go b/pkg/storage/migrator.go index 7aaedfe5..49c3a090 100644 --- a/pkg/storage/migrator.go +++ b/pkg/storage/migrator.go @@ -52,12 +52,6 @@ func NewMigrator(source TrackingStorageProvider, } } -func (m *Migrator) RequestBlock(block int) { - // Request a block as priority... - - // Wait until it's completed -} - /** * Migrate storage to dest. * This naively continues until all data is synced.