Skip to content

Commit

Permalink
Added unit test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyaxod committed Jan 23, 2024
1 parent 89539e8 commit aafd181
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 6 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -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 ./...
6 changes: 0 additions & 6 deletions pkg/storage/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit aafd181

Please sign in to comment.